Test Automation Pyramid: 2021 Version

Lauren
Software QE
Published in
4 min readMar 22, 2021

--

One of the most powerful reference points for automation engineers (especially on greenfield projects) is the Test Automation Pyramid concept. To summarize, the pyramid suggests that the lower-level application tests (unit, component, functional tests) should be the majority of an application’s overall test count. As tests become more high-level — covering end-to-end functionality, and possibly rely on systems outside of the application under test — it is a good practice to have fewer of these.

Here are a few reasons why:

  • Unit tests are quick to create, especially for a team that is doing Test-Driven Development
  • Lower-level tests (unit, functional, component) run much faster than end-to-end tests — especially UI tests
  • UI and end-to-end tests that rely on external systems can fail due to environmental issues, slowness, or faulty test data (there are ways to prevent these things, but not all teams utilize them or may have constraints)

There are dozens of different versions of the test automation pyramid floating around, and while they are all conceptually the same, terminology can differ (component vs. functional; end-to-end vs. system) and there are testing frameworks and tools that have popped up in the last couple years which have introduced new ‘types’ of tests. I’m sharing the current Test Automation Pyramid that my team has implemented.

--

--