Why testing levels exist
Different levels answer different questions. Lower-level tests provide fast, focused technical feedback. Higher-level tests validate interactions, workflows, and business outcomes.
Unit and component testing
Unit tests validate small units of code in isolation. They are fast and excellent for diagnosing logic defects.
Component tests validate a larger unit such as a service, module, or API component, often with external dependencies stubbed or simulated.
Integration testing
Integration testing validates interactions between services, databases, queues, identity providers, third-party APIs, or other systems.
Typical risks include incorrect contracts, mappings, sequencing, authentication, retries, timeouts, duplicate processing, and inconsistent error handling.
System and end-to-end testing
System testing validates the complete solution against functional and non-functional expectations in a representative environment.
End-to-end testing validates a complete business or technical workflow across multiple integrated components. E2E is valuable but more expensive and fragile, so it should be selected carefully.
User acceptance testing
UAT validates whether the solution is suitable for intended business use. Business representatives focus on workflows, operational fit, usability, and acceptance criteria.
How the levels work together
| Level | Primary value | Typical speed |
|---|---|---|
| Unit | Logic correctness | Very fast |
| Component | Module/service behaviour | Fast |
| Integration | Interface correctness | Medium |
| System | Whole-system validation | Medium / slow |
| End-to-end | Cross-system workflow confidence | Slow |
| UAT | Business suitability | Variable |