Automated Testing
Write tests that let you change code with confidence: unit, integration and API tests, test doubles, and what coverage really tells you.
Prerequisites
- C# fundamentals
- Basic ASP.NET Core or another application to test
Technologies
About this course
Tests exist so you can change code without re-checking everything by hand. That is the whole justification, and it is worth keeping in view, because tests written for any other reason tend to be the ones teams delete.
This course starts with a single unit test and builds up through test doubles, integration tests that use a real database, and API tests that exercise a running application.
It also covers what to leave untested. Tests that assert implementation details rather than behaviour make refactoring harder, which is the opposite of the point.
Course roadmap
All 13 lessons are written and available.
- 01Why Testing MattersExplain what tests actually buy you, and use that to judge whether a given test is worth writing.12 min
- 02Your First Unit TestCreate a test project, write a test, and run it.16 min
- 03Arrange, Act, AssertStructure tests so a failure points to a single cause.14 min
- 04AssertionsAssert precisely, and write failure messages that explain themselves.16 min
Module 02
Isolating What You Test
Replace awkward dependencies, and know which kind of replacement you need.
Module 04
Testing in Practice
Organise the suite, read coverage honestly, and keep it green in the pipeline.
On completion
What you should take away
- Tests buy you the freedom to change code, and that is how to judge whether one is worth writing
- Test behaviour, not implementation, or refactoring becomes harder instead of easier
- Integration tests catch the wiring mistakes unit tests cannot see
- Coverage measures execution, not correctness
Recommended next course
Software Architecture
Structure systems deliberately: layering, SOLID, clean architecture, patterns, and honest guidance on when each is the wrong choice.
Continue to ArchitectureHave a project worth talking through?
Tell us what you're building or what's slowing your current system down. We'll give you a direct read on scope and approach.