.NET Testing Techniques You Didn’t Know You Needed
summary
Covers concrete techniques: use Bogus with seeded randomness and large samples to make randomized tests repeatable, use FSCheck for property-based tests (100 cases per property) instead of reimplementing expected results, use Verify for snapshot testing to gate OpenAPI/complex outputs, and run Striker mutation testing (example run generates 333 mutants and kills 275) to measure test quality and find missing assertions or cases. Also recommends UTC/fake clocks, avoid global mutable state, and run mutation suites nightly.
AI-written summary · about
chapters (15)
- 0:00Introduction
- 1:13Why we write tests
- 8:40Incomplete testing solutions
- 11:09Randomized testing basics
- 13:16Flaky tests and fixes
- 17:28Controlling time in tests
- 23:40Property based testing
- 26:52FS check demo
- 31:24Snapshot testing explained
- 36:22Verify library demo
- 39:37Measuring test quality
- 41:22Mutation testing overview
- 43:28Striker demo
- 47:52AI and testing techniques
- 52:55Conclusion and Q&A
