# Test automation **[Test automation](https://en.wikipedia.org/wiki/Test_automation)** is running tests programmatically rather than manually. A program verifies that features work instead of a person clicking through an application. Tests run on every change and give pass/fail results within minutes. Manual testing does not scale. A codebase with a thousand features cannot be retested manually on every change. Without automation, testing is deferred to a release cycle and bugs are discovered late in the process. Automated tests form a pyramid: [[swe:unit-test|unit tests]] at the base (fast, many), integration tests in the middle (verify components work together), and end-to-end tests at the top (verify the whole system from the user perspective). Running this suite in a [[swe:ci-cd]] pipeline catches regressions immediately and provides a precise record of expected behaviour for new developers. The pyramid shows the volume and speed tradeoff: many fast unit tests at the base, fewer slower integration tests, and fewer still slow end-to-end tests at the top. ``` /\ / \ E2E tests (slow, few) / \ "Click button, verify checkout succeeds" /------\ / \ Integration tests (medium, some) / \ "Database saves order, email sends" /------------\ / \ Unit tests (fast, many) / \ "calculateTotal() returns correct sum" /------------------\ ```