Chapter 3 of 6
Choose where to test each risk
How do you choose the right mix of unit, integration and journey tests?
For each risk, choose the smallest test that can observe the failure. Add a test at a wider boundary when it answers a different question, such as whether a database commits the right state or a visitor can finish a task.
Give each check a job
Start with the rule and work outwards. Write one sentence about what each proposed check will tell the team. That sentence makes redundant checks and missing interactions easier to spot.
- Assign exact values and boundary decisions to a fast check with controlled inputs.
- Identify what depends on components working together. Exercise those components with representative state and inspect the result of their interaction.
- Keep a short journey for the part only a user can see. Record which conditions each layer leaves untested.
Which tests should block a merge?
Agree which failures would make this change unsafe to merge. Run the fastest reliable check for each of those risks on the proposed revision. A price calculation can have a unit-level gate, while a change to how payments are saved may also need a database check. Give slower checks an explicit place in the release plan and an owner who can act on a failure.
Keep the plan small enough to run
A usable plan maps each risk to a case, an oracle, a layer and an owner. Two checks can share an example if they observe different consequences. Write one line about why both belong.
Worked example
Three questions about the same seat
A unit test compares the confirmation time with the deadline. An integration test starts two attempts to reserve the last seat and reads back how many active holds were stored. A browser journey lets an expired visitor choose another seat and checks the message and focus change. A unit check can pass even when that recovery link is missing.
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