The testing pyramid, in practice
Most tests should be fast and close to the code. Fewer, broader tests cover how components work together. A small number of end-to-end tests cover the most important user journeys. Exploratory testing by people sits across all of them.
Tools by level
| Level | Examples |
|---|---|
| Unit | The standard test frameworks for each language, such as xUnit, JUnit, pytest and Jest |
| API and contract | API test tools and consumer-driven contract testing |
| UI and end to end | Playwright, Cypress and Selenium |
| Performance | Load testing tools such as k6, JMeter and Gatling |
| Security | Dynamic application security testing and dependency scanning |
| Accessibility | Automated accessibility engines plus manual screen reader testing |
AI-assisted testing
AI helps generate test cases from requirements and code, suggest edge cases, create realistic synthetic test data and explain failing tests. Test engineers review every AI-generated test before it is kept, because a test that checks the wrong thing is worse than no test at all.
Testing AI features
AI features need additional testing: evaluation sets with expected outputs, accuracy thresholds, safety and prompt injection tests, and regression runs whenever a prompt, model or data source changes.
Test data
Masked copies of production data where approved, and synthetic data that preserves realistic patterns without exposing real people.
Test management
Tests live with the code in version control, run in the pipeline and report results to dashboards everyone can see. Flaky tests are tracked and fixed, not ignored.