Testing happens at several levels, each targeting a different scope — from a single function up to the whole system in the hands of users. Together they form a layered safety net.
Acceptancedoes it meet user needs?
Systemwhole application end to end
Integrationcomponents working together
Unitindividual functions / components
The four levels
- Unit testing — the smallest pieces of code, usually by developers.
- Integration testing — how components and services work together.
- System testing — the complete, integrated application.
- Acceptance testing — whether the system satisfies business and user needs.
The test pyramid
A healthy strategy has many fast, cheap unit tests at the base, fewer integration tests in the middle, and a small number of broad end-to-end tests at the top. Inverting this — relying mostly on slow UI tests — leads to brittle, expensive suites.
Guideline: push tests as low as they can sensibly go. A bug caught by a unit test is far cheaper to diagnose than the same bug caught by an end-to-end test.
Conclusion
The levels of testing give coverage at every scale, and the test pyramid keeps that coverage fast and affordable. Balancing the levels well is one of the clearest signs of a mature test strategy.