
.NET Rocks! Valuable Testing with Egil Hansen
Oct 9, 2025
Egil Hansen, developer and Microsoft MVP who created BUnit, talks testing strategy and tooling. He outlines four pillars of valuable tests. He compares integration vs unit approaches and favors externally observable behavior. He discusses custom fakes over mocks, using interfaces at system edges, mutation testing with Stryker, and how LLMs can write or review tests.
AI Snips
Chapters
Books
Transcript
Episode notes
Four Pillars Of Valuable Tests
- Valuable tests give confidence to deploy by protecting against regressions and resisting refactors.
- Egil highlights four pillars: regression protection, refactor resistance, fast feedback, and maintainability.
Start With Integration Tests
- Start with integration tests and peel into unit tests only when business logic is hard to test through public APIs.
- Use integration testing by default and isolate units when needed for faster feedback.
Avoid Implementation Details In Tests
- Keep implementation details out of tests and focus on externally observable behavior.
- Test through the public surface so refactors of internals don't break valuable tests.



