Guide
A test automation strategy that survives contact with a roadmap
What to automate, in what order, at which level, and how to stop a suite becoming the thing the team works around — written for teams who have tried this once already and got a suite they do not trust.
A test automation strategy that survives contact with a roadmap
Most automation projects do not fail loudly. They produce a suite, the suite goes green, and then over six months it becomes slower, less trusted and more expensive to maintain than the manual process it replaced — until someone quietly adds a step to the release checklist that says "re-run if red".
That failure has a shape, and it is almost always structural rather than a matter of effort or tooling. This guide sets out the decisions that determine whether a suite compounds or decays: what to automate first, which level to write each check at, how test data is owned, and what has to be true before automation returns more time than it consumes.
A red build nobody believes is worse than no build at all. It teaches a team to ignore the one signal they were paying for.
Chapter 01
Preconditions: when not to automate yet
Automation encodes an expectation. If the expectation is still changing weekly, encoding it produces work that gets thrown away, and the team learns that automation is expensive rather than that they automated too early.
Signals that it is too early
- The flow under test has changed shape more than once this quarter, as opposed to changing content.
- Nobody can state the expected behaviour without asking someone else, which means the first output should be a written expectation rather than a script.
- There is no environment that can be brought to a known state, so every run starts from whatever the last person left behind.
- The team has no capacity to fix a failing test within a day, which is the point at which a red build starts being ignored.
None of these are permanent. They are sequencing problems, and the useful move is to spend a cycle of manual and exploratory testing establishing what matters and stabilising it, then automate the part that has settled.
Chapter 02
Choosing the level: where a failure names one thing
The single most useful property of a test is that its failure tells you where to look. A browser test that goes red tells you a page is broken. A service-level check tells you which component broke it. That difference compounds across hundreds of runs and thousands of triage minutes.
| Level | Answers | Costs | Use it when |
|---|---|---|---|
| Unit | Is this function correct? | Cheap to write, cheap to run, invisible to the product | The logic has branches worth enumerating |
| Service / API | Does the system agree with its own contract? | Moderate, and stable across interface changes | The assertion is really about data or authorisation |
| Browser | Can a person complete this journey? | Slow, and the most fragile of the three | The journey genuinely requires a rendered interface |
The practical rule is to push each check to the lowest level that can still answer the question honestly. A login test at the browser level is often really an API-level authorisation question wearing a slower costume.
Chapter 03
Order: what to automate first
Not the newest feature, and not the easiest flow. The first tranche should be the journeys where a regression is both plausible and expensive, because those are the ones that justify the maintenance commitment you are taking on.
01
The revenue path
Whatever sequence ends in money changing hands or a customer being created. It is the flow with the clearest cost of failure and usually the one with the most integration surface underneath it.
02
The flows your support queue already complains about
Defect history is a better predictor of future defects than any risk workshop, and it is free. Whatever broke twice will break again.
03
Authorisation boundaries
Horizontal checks — one account attempting another account’s resources. Cheap to write once the request scaffolding exists, and the failures are severe when they occur.
04
Everything else, slowly, on evidence
Coverage added because something broke, rather than coverage added because a percentage looked low.
Chapter 04
Test data is the decision that determines everything else
Almost every property teams want from a suite — parallel execution, deterministic results, the ability to run against any environment — is downstream of one decision: whether each test creates and destroys the data it needs, or whether tests share a fixture set that someone maintains by hand.
Shared fixtures are faster to start with and are the most common cause of a suite that cannot be trusted. Tests begin depending on state left by earlier tests, order becomes significant, parallelism becomes impossible, and a failure late in the run tells you nothing about what actually broke.
Isolated test data is not a refinement you add later. It is the thing that decides whether a suite can run in parallel, and retrofitting it means rewriting every test that assumed otherwise.
Where realistic data is genuinely required, the constraint becomes a data-protection one rather than an engineering one, and the options narrow. That is covered separately in testing with production-like data without breaking GDPR.
Chapter 05
Gating: what a red build should actually stop
A suite that runs but blocks nothing is a report. It has some value, and considerably less than the cost of maintaining it. The moment automation starts paying back is the moment a failure prevents something.
That does not mean everything should gate. The sensible arrangement is tiered: fast, deterministic checks gate every pull request; slower browser journeys gate the merge to the release branch; long-running suites run on a schedule and gate nothing, because a two-hour job in the critical path teaches people to bypass it.
- Per pull request: unit and service-level checks, finishing in a few minutes.
- Per release candidate: the browser journeys, with a defined owner for triage when they fail.
- Nightly: anything slow, exploratory or environment-dependent, reviewed rather than enforced.
Wiring this properly is most of what a CI test integration engagement consists of, and it is usually the step that turns an existing suite from a report into a gate.
Chapter 06
Ownership: the constraint that outlives the tooling
The deciding question for framework choice is rarely which tool is technically best. It is whether the people who will still be here in a year can read and extend what gets written. A framework only one supplier understands has a half-life measured in months after that supplier leaves.
This is the argument for building in the language your product team already uses, for keeping the abstraction shallow enough to read, and for treating handover as a deliverable rather than an email. It is also why we build frameworks to be extended by product engineers rather than by specialists, and why the in-house versus outsourced question usually resolves to a blend rather than to either pole.
Going deeper
The individual pieces
- Building a test automation framework from scratch: the first 90 daysWhat actually gets built, in what order, and why the teams that start by recording scripts end up rewriting everything.
- Manual testing vs test automation: which to invest in firstAutomation is not a more advanced form of manual testing. They answer different questions, and picking the wrong one first is an expensive way to learn that.
- In-house QA vs outsourced QA: how to decide which one you needThe comparison is rarely about the day rate. It is about hiring lead time, what happens between releases, and how much of your quality knowledge sits in one person’s head.
FAQ
Questions this guide gets asked
What percentage of our tests should be automated?
The question does not have a useful answer, and the ratio people quote is a description of healthy suites rather than a target to hit. A better measure is whether your release is currently waiting on a manual pass, and whether a failure in the automated tier is investigated or re-run. Those two tell you what to do next; a percentage does not.
We already have a suite nobody trusts. Start over or repair it?
Usually repair, but diagnose first. If the distrust comes from flakiness, that is structural and fixable — shared state, timing assumptions, unstable environments — and the existing coverage is worth keeping. If it comes from tests asserting the wrong things at the wrong level, the coverage has little value and rebuilding from the revenue path is faster than arguing with it.
How long before automation saves us time?
Longer than most business cases assume, and the first return is rarely time. It is the ability to release without a manual gate, which shows up as cadence rather than as hours saved. If someone quotes you a payback period in weeks, ask what they are assuming about maintenance — that is the number that decides it.
Contact
Have a project in mind?
Tell us what you are building — or what keeps breaking. You will get a considered reply from an engineer, not an autoresponder.