What is the test automation pyramid?
The test automation pyramid is a model for balancing test types: many fast, cheap tests at the base (unit), fewer service-level tests in the middle (integration/API), and a small peak of slow, expensive UI or E2E tests. The idea is to catch defects as low in the stack as possible for quicker feedback and lower maintenance. Inverting the pyramid - mostly UI automation with few unit tests - often leads to flaky pipelines and long runtimes. Real teams adjust proportions based on app architecture; API-heavy products may invest more in contract and integration layers. The pyramid is a guideline for investment, not a rigid quota. Revisit balance when flake rate, release cadence, or architecture changes.