Teams either over-invest in slow UI tests or rely on manual checking. How should testing effort be split across levels to get fast feedback and still catch unexpected defects?
When to use it
Software teams designing or auditing their test strategy. Teams whose build is slow because of too many UI tests. Products where unscripted usage reveals defects that automation misses.
Where it comes from
The base test pyramid is widely credited to Mike Cohn (Succeeding with Agile, 2009). Adding exploratory testing as a manual layer is a later practitioner extension and is not attributable to him.
Mike Cohn · 2009
Sheet 2/4
How it works
Tests are arranged by scope and cost. Unit tests are cheap, fast and numerous, so they form the base. Integration tests check interfaces between components and are fewer. End-to-end tests exercise whole user flows, are slow and brittle, and are kept minimal. Exploratory testing sits on top as a skilled human activity that combines learning, test design and execution to find what scripted checks do not anticipate. The shape signals where to invest and where to cut.
You need
The current test inventory by level, build and test run times, defect escape data, and testers with exploratory skills.
You get
A target test distribution across levels, a plan to move tests down the pyramid, and a schedule of exploratory sessions.
Sheet 3/4
Case
Illustrative case
Kestrel Pay, a payments app, had 600 slow UI tests and a 90-minute pipeline, yet bugs still reached production. The QA lead mapped the suite: 1,200 unit tests, 150 integration tests, 600 end-to-end tests. She moved checks for validation rules and currency maths into unit tests, cut the end-to-end suite to 80 critical journeys, and added two time-boxed exploratory sessions per release, each with a charter such as 'refund edge cases'. Pipeline time fell to 25 minutes, and exploratory sessions found three defects in refund handling that no script covered.
A fictional company used to explain the model.
Sheet 4/4
Caution
When to avoid it
Systems where the pyramid shape does not fit, such as heavy integration or data pipeline work that may need a different balance.
Very small prototypes where tests cost more than the code.
Treating the shape as a quota rather than a heuristic.
Common mistakes
Inverting the pyramid with mostly UI tests.
Treating exploratory testing as random clicking without charters or notes.
Duplicating the same check at every level.
Reading the shape as a fixed ratio instead of a prompt to push tests to the cheapest level that can catch the defect.
Known weaknesses
The shape is a heuristic and does not fit every architecture
Says nothing about test quality, only quantity by level
Exploratory testing is hard to measure and easy to under-fund
Variant names and layer definitions vary between authors
How to apply it in 5 steps
How to apply it
Test Automation Pyramid with Exploratory Testing
5 steps
01of 5
Step 1 of 5: Inventory current tests
Count tests per level and record run time and failure causes.
01
02of 5
Step 2 of 5: Strengthen the unit base
Cover logic and edge cases with fast isolated tests.
02
03of 5
Step 3 of 5: Add targeted integration tests
Check interfaces, databases and services between components.
03
04of 5
Step 4 of 5: Limit end-to-end tests
Keep only critical user journeys in the slow UI layer.
04
05of 5
Step 5 of 5: Schedule exploratory sessions
Run chartered, time-boxed sessions with notes and feed findings back as automated tests.
05
Click to unfold
Use the arrow keys to move between steps, Home and End for the first and last, and Enter to fold or unfold the booklet.
View all 5 steps
01
Inventory current tests
Count tests per level and record run time and failure causes.
02
Strengthen the unit base
Cover logic and edge cases with fast isolated tests.
03
Add targeted integration tests
Check interfaces, databases and services between components.
04
Limit end-to-end tests
Keep only critical user journeys in the slow UI layer.
05
Schedule exploratory sessions
Run chartered, time-boxed sessions with notes and feed findings back as automated tests.
Which decisions it helps with
Decision profile
A map or diagram to take action on processes and operations.
Keyboard: Tab to the sheet, use the arrows to explore the assessments and their questions, and press Escape to close the note.
IIdentity
Type of tool
Map or diagramlikely
The questionWhat kind of tool is it?Assessment · Map or diagram · 60 %
Decision stage
Plan the work, roles and deadlineslikely
The questionWhat stage of the decision are you at?Assessment · Plan the work, roles and deadlines · 68 %
What it applies to
Processes and operationsvery likely
The questionWhat is the decision about?Assessment · Processes and operations · 96 %
Discipline
Agile and software developmentvery likely
The questionWhich discipline does it come from?Assessment · Agile and software development · 100 %
What it produces
A map of relationships, flows or causeslikely
The questionWhat kind of tool is it?Assessment · A map of relationships, flows or causes · 60 %
IIIResources required
TimeBetween “several days” and “weeks or months”The questionHow much time can you spend on this?Assessment · Between “several days” and “weeks or months” · confidence 40 %
PeopleA small group (2 to 8)The questionHow many people will take part?Assessment · A small group (2 to 8) · confidence 79 %
DataData collected for the purposeThe questionWhat data do you have available?Assessment · Data collected for the purpose · confidence 84 %
ExpertiseWorks best with a facilitatorThe questionDoes anyone have experience with methods like these?Assessment · Works best with a facilitator · confidence 88 %
Time horizonA few monthsThe questionHow far ahead do you need to plan?Assessment · A few months · confidence 87 %
ScopeOne teamThe questionWho will this decision affect?Assessment · One team · confidence 87 %
FrequencyOccasionallyThe questionIs this a one-off decision or something you expect to repeat?Assessment · Occasionally · confidence 85 %
The team’s own knowledge is enoughThe questionCan you speak to customers, users or people outside your organisation?Assessment · The team’s own knowledge is enough
IITen axes
The dot shows which end the model favours. A hollow dot means no clear preference.
DirectionExecutionThe questionAre you setting direction or improving day-to-day operations?Assessment · Mostly execution · confidence 59 %
Top-downBottom-upThe questionShould leadership set the direction, or should the answer come from the people doing the work?Assessment · Both equally · confidence 52 %
PeopleProcessesThe questionIs this mainly a people problem or a process problem?Assessment · Mostly processes · confidence 94 %
Generate optionsNarrow down optionsThe questionDo you need to generate more options or narrow them down?Assessment · Mostly narrow down options · confidence 83 %
Step-by-step analysisIntuition and experienceThe questionWould you rather work through the evidence step by step or draw on the group’s experience?Assessment · Mostly analysis · confidence 85 %
A strict sequence of stepsA flexible frameworkThe questionWould you prefer a precise set of steps or a framework you can adapt?Assessment · Mostly a flexible framework · confidence 86 %
Protect what we haveTake a riskThe questionDo you need to protect what you have or take a chance on something new?Assessment · Protect what we have · confidence 61 %
Improve what we haveFundamental changeThe questionDo you want to improve what you have or change it fundamentally?Assessment · Mostly incremental improvements · confidence 55 %
Inside the organisationOutside the organisationThe questionWhere do you expect to find the answer, inside your organisation or in the market?Assessment · Inside the organisation · confidence 96 %
Understand firstAct nowThe questionDo you need to understand the situation first or act now and learn as you go?Assessment · Both equally · confidence 55 %
IVUseful when
We don’t have enough time, money or people to do everythingThe questionWhich of these situations sounds familiar?Assessment · a situation I face → useful · 82 %
Applicable traits
How it supports actionDecide what comes firstThe questionWhat do you need in order to act?Assessment · Decide what comes first · 84 %
How was this profile calculated?
An automated system reads each model card and answers the same questions for every model. This profile has answers for 77 of 77. No answers are entered by hand.
A very high probability counts as “yes” and a very low one as “no”. Intermediate answers are hidden.
On the axes, mixed means the model favours neither end.
DevSecOpsSame stage: take action · same subject · for larger groups
Verified sources
Use the arrow keys to move between sources.
Original work
Cohn, M. (2009). Succeeding with Agile: Software Development Using Scrum. Addison-Wesley Professional.Cohn's 2009 book is the cited origin of the Test Automation Pyramid per Fowler's page; Cohn's own page confirms the book and Nov 2009 date but does not mention the pyramid.View source: Succeeding with Agile: Software Development Using Scrum (opens in a new tab) ↗
Key development
Fowler, M. (2012). Test Pyramid. martinfowler.com.Explains and credits the pyramid (also Jason Huggins's independent version, c. 2006); does not mention exploratory testing.View source: Test Pyramid (opens in a new tab) ↗
Fowler, M. (2021). On the Diverse And Fantastical Shapes of Testing. martinfowler.com.Reviews the honeycomb and trophy shapes as reactions to the Test Pyramid and notes the debate is clouded by the lack of an agreed definition of 'unit' vs 'integration' test.View source: On the Diverse And Fantastical Shapes of Testing (opens in a new tab) ↗
Critique
Engineering), A. S. (. (2018). Testing of Microservices. Spotify Engineering blog.Argues the traditional Testing Pyramid no longer fits microservices and 'can be actively harmful': too many unit tests on small services freeze implementation details, while the real complexity lies in service interactions; proposes the integration-heavy 'Testing Honeycomb' instead.View source: Testing of Microservices (opens in a new tab) ↗