Where testing happens.
WHAT THE LEVELS ARE
- Unit: individual functions or classes
- Integration: components working together
- System: the complete application
- Acceptance: whether it meets the need
WHAT UNIT TESTS VERIFY
Logic, in isolation, with dependencies substituted.
WHAT THEY PROVIDE
Speed, precision about what broke, and confidence to refactor.
WHAT INTEGRATION TESTS VERIFY
That components communicate correctly.
WHAT THEY CATCH
Interface mismatches, configuration errors, and assumptions about other components.
WHAT SYSTEM TESTS VERIFY
Behaviour of the assembled application, from outside.
WHAT ACCEPTANCE TESTING ESTABLISHES
Whether the software serves its purpose.
WHO PERFORMS IT
Users or their representatives, ideally.
WHAT THE PROPORTIONS SHOULD BE
Many fast low-level tests Fewer integration tests Few end-to-end tests
WHY THAT SHAPE
Low-level tests are fast and precise; high-level ones are slow and fragile.
WHAT INVERTING IT PRODUCES
A slow suite that fails intermittently and locates nothing.
WHAT TO AVOID
Testing the same logic at several levels Skipping a level entirely
WHAT TO DECIDE PER BEHAVIOUR
The lowest level that can verify it.