In this blog series, I’ll show you a test strategy that I’ve used with several different companies to achieve high quality and productivity.
Test automation saves money, improves time-to-market, and raises quality, but it’s also expensive. This test pyramid gives a guideline on how to allocate your efforts.
I’ll give you the basic definitions, roles, success measures, best practices, and some possible maturity levels – enough info to put a functional test strategy in place for your project to achieve high quality at a reasonable cost.
What does this automation strategy do?
This is a general-purpose test automation strategy that is
Improve and maintain
- Minimize duplicate testing
- Making it fast and easy to validate code changes as soon as possible
- Help developers know when they have “enough” test automation
The pyramid shape comes from the goals of minimizing test duplication and putting tests as close to the thing they’re testing as possible. For example: once you’ve tested all the variations of the login functionality through unit and component testing, you need only a couple variations of it as integration tests (positive and negative) and the end-to-end testing only has the basic positive login as part of larger tests. You don’t need to test all the login variations through the UI.
What does it NOT do?
It only covers functional automation. For a complete test strategy, you still need:
- non-functional automation like performance and scale testing
- manual and exploratory testing
- tracking of code and quality metrics,
- tracing customer value to test result
and for services:
- passive and active monitoring of the production site
- experimentation (A/B testing, betas, feature flags, etc.)
- scale and resilience testing in production
Finally, the test pyramid strategy is very efficient, but not necessarily the most effective strategy for what you need right now. For example, it focuses a lot of effort on unit tests, which help a lot with productivity, but help a lot less with quality unless you have complex logic. If you have quality problems, do some root cause analysis. Unit tests may not be the first thing to fix.
The blog series….
In these posts, we’ll go over each test type. We’ll detail their purpose, who is responsible for them, and how to measure them.
- Structure of the test automation pyramid
- Unit Testing
- API/Component Testing
- Integration Testing
- End-to-end Testing
- In what order should functional test automation be implemented?
As companies ship software faster, test automation is needed more than ever to maintain quality. Good automation can reduce your time to release from months to hours. It can document your code and improve quality and productivity for the team.
However, test automation is also a big investment, so before you drop a few $100K on an offshore UI automation vendor, consider how to use this pyramid test strategy to create the right mix of functional testing for your product development roadmap.