A test is a small piece of code that checks whether application logic behaves as expected. Tests help catch regressions as an application changes and document behavior. section 15.0 section 15.4
Tests can focus on different scopes and follow a simple structure:
- A unit test checks one isolated piece of logic; an integration test checks whether multiple components interact correctly. section 15.4
- A mock is a controlled fake object that replaces a dependency the test does not need to check. section 15.4
- Set assumptions and mock behavior, call the method, then validate its behavior. section 15.4
Why testing matters
The troubled 2013 Healthcare.gov launch illustrates the risk: required end-to-end testing was incomplete, and components with known defects were released. section 15.0


































































