# The test pyramid and testing trophy explained

> Compare the test pyramid and testing trophy. Follow a collection-slot change across unit, integration and browser checks to see why each earns its place.

Source: https://cueapril.com/knowledge/explanations/test-layers-and-tradeoffs
Updated: 2026-12-02
Index: https://cueapril.com/llms.txt

## When is a unit, integration or end-to-end test the right choice?

Choose the layer that can observe the failure with the least setup and ambiguity. A unit test can isolate a rule, an integration test can expose a broken interaction, and an end-to-end test can show whether a user completes a journey.

## What do the two shapes describe?

The test pyramid favours many small checks and fewer full journeys. The testing trophy puts more emphasis on integrated behaviour, especially when a feature’s value lies in several components working together. Both are prompts to examine the work each test does. Neither shape supplies a suitable percentage for every system.

## When does a second layer earn its place?

Add a layer when it contributes an observation the first layer cannot make. A price calculation can be correct in isolation while an interface displays the old value. Exercising every discount combination in a browser adds cost, but a focused journey that checks the displayed total answers a separate question.

## Worked example: A changed collection slot

Check the scheduling rule with a fixed clock. Exercise the service and database together to confirm the change survives a fresh read. Then use one browser journey to show that the customer sees the revised time. When a check fails, its layer gives the investigator a sensible starting point.

## Try it on your pull request

Choose a change in your repository and tell Cue April what should happen. Review the proposed checks before they run.

[Try Cue April on your repository](https://app.cueapril.com/sign-up/?next=%2Fquality-start)

## Related reading

- [Choose where to test each risk](https://cueapril.com/knowledge/playbook/design-the-test-portfolio)

- [How to verify a consumer-driven contract](https://cueapril.com/knowledge/how-to/verify-a-consumer-contract)

- [How to choose a test oracle](https://cueapril.com/knowledge/how-to/select-a-test-oracle)

[Browse the Knowledge base](https://cueapril.com/knowledge)
