Skip to content

anthonylloyd/cscheck

v0.1.1Apache-2.0

Find what a C# project's tests miss, and write tests that find bugs.

writing-cscheck-tests

Writes CsCheck tests for .NET code that find bugs rather than just pass. Also use it when writing or reviewing unit tests for pure logic, to consider whether a property would find more or could replace them. E.g. "add a CsCheck property for this parser", "write a round trip test for X", "check Equals and GetHashCode agree", "is my new version faster", "model this protocol as a Spec and check the code conforms", "test this class for thread safety", "why does my property pass when the code is broken". Covers Sample, Equality, SampleModelBased, SampleMetamorphic, SampleParallel, Spec, Faster, causal profiling, Single and Check.Hash, and what changed in CsCheck 5. To hunt for the bugs themselves, use closing-test-gaps.

License
Apache-2.0
Compatibility
Written for CsCheck 5, which targets net10.0 and net11.0. Probes need the .NET 10 SDK or later.
Read SKILL.md at the source

Pinned to revision abab5936aa03, so it is the text this page describes rather than whatever the author pushed since.

Files

Every link opens the file at its source, pinned to the revision this page describes.