Strategy, metrics & influence
Risk-based prioritisation, metrics that survive scrutiny, and building a programme from zero.
Risk-based prioritisation
Score features by probability and impact, assign a layer to each, and be willing to write "no automation".
Coverage decisions are easier to make and far easier to defend when they come from a scored table rather than from intuition. Score each feature for the probability that it breaks and the impact if it does, multiply, and then assign a coverage approach to each row: which layer, how exhaustively, and whether a user-interface journey is justified at all. The output is a single page that converts an unfalsifiable request for more testing into a specific, negotiable plan, and it is the right artifact to bring to a planning conversation because a stakeholder can argue with a score in a way they cannot argue with a feeling. The most important rows are the ones where the answer is no automation. A plan without any such rows has not actually prioritised; it has just listed everything. Being able to say that a feature is not worth automating, and to show the reasoning, is what separates an engineer who owns a strategy from one who processes a backlog.
Key points
- Risk equals probability multiplied by impact; score every significant feature and assign a layer
- The table converts "we need more testing" into a specific, negotiable plan
- A plan with no "no automation" rows has listed everything rather than prioritised anything
Code
Run the code to see the result.
One page, defensible, negotiable — and the last row is the one that proves it is a plan.
See it in the framework
Reviewed against commit f9ada16 (2026-08-14).
Common pitfalls
- Scoring impact only, which over-invests in rare catastrophes and under-invests in frequent moderate failures
- Never revisiting the table, so it reflects the risk profile of a product that no longer exists
Practice exercise
Build this table for a product you work on, including at least one row where you recommend no automation. Present it to someone who disagrees and see whether the scoring survives the conversation.
Metrics that survive scrutiny
Escaped defects, flake rate, runtime and time to diagnose; treat coverage as a discovery tool, never a target.
A small number of measures genuinely reflect whether an automation effort is working. Escaped defects — problems that reached users — sits closest to the actual goal, and it should trend downwards, but treat it as a trend inside a stable reporting process rather than an absolute number: release volume, how heavily a feature gets used, and how diligently people file bugs all move it independently of test quality, so comparing raw escaped-defect counts across teams or quarters with different volumes proves less than it looks like it does. Flake rate determines trust: the higher it climbs, the more failures get rerun instead of read, and once a team stops trusting a red result by default, the suite has stopped doing its job — where exactly that point sits is a property of your team and your on-call load, not a fixed percentage. Suite runtime for the merge gate determines whether people wait for the result. Time to diagnose a failure measures your reporting, which is a real deliverable rather than a nicety. The distribution of defects by layer is a useful diagnostic worth looking at, but not a self-proving one: if the interface layer finds most of your bugs, that's a prompt to check whether the service layer is under-covered — it can also mean the interface layer owns real risk of its own (rendering, cross-browser behaviour, client-side state) that no amount of service-layer coverage would have caught. Coverage percentage deserves particular care. It is genuinely useful for discovery, since noticing that nothing exercises the refund path is worth knowing, and it is actively harmful as a target, because it measures execution rather than verification and a test with no assertions raises it. Test count and automation percentage are worse still, since both improve when you do the wrong thing.
Key points
- Escaped defects sits closest to the actual goal, but it's confounded by release volume and usage — read it as a trend inside a stable process, not a number to compare across teams or quarters
- Coverage is a discovery tool and a harmful target — it measures execution, not verification
- If the interface layer finds most of your defects, investigate whether the service layer is under-covered — it doesn't prove that on its own; some risk is genuinely UI-only
Code
Run the code to see the result.
Report in the units the business already uses, and the conversation stops being about test counts.
See it in the framework
- Project overview:
README.md— live · reviewed - CI · CI pipeline:
.github/workflows/ci.yml— live · reviewed - Strategy notes:
docs/09-strategy.md— live · reviewed
Reviewed against commit f9ada16 (2026-08-14).
Common pitfalls
- Reporting test counts and coverage to management, which invites pressure toward numbers that do not reduce risk
- Setting a coverage target, after which people write assertion-free tests that execute code and verify nothing
Practice exercise
Draft the monthly report you would send about a suite you work with. Include no test counts and no coverage percentage, and check whether you can still make the case convincingly.
Building an automation programme from zero
Foundations and CI first, then the cheap layer, then the expensive one, then hardening — in that order.
The order in which a programme is built matters more than any individual tool choice. Start with foundations and get one trivial test running end to end in the pipeline before writing fifty more, because everything after that inherits whatever the foundation got wrong. Then build the service layer against the highest-risk flows, applying a systematic test-design checklist rather than intuition. Only then add the interface layer, and add far fewer tests than instinct suggests — five to ten genuine journeys, not fifty. Emulated mobile web comes almost free at that point. Real devices and native applications come next, at a nightly cadence. Finish with hardening: parallel execution, a flake hunt, reporting history and a quarantine process. Most failed efforts invert this, writing hundreds of interface tests first, then discovering that nothing runs in parallel and no failure explains itself. Alongside the technical work, the highest-leverage requests to make of other teams are a test-data creation endpoint, stable test identifiers, and accessibility identifiers on mobile.
Key points
- Get one test running end to end in CI before writing fifty more — everything inherits the foundation
- Service layer before interface layer, and far fewer interface tests than instinct suggests
- Ask other teams for a test-data endpoint, stable test identifiers and mobile accessibility identifiers
Code
# Weeks 1-2 Foundations: repository, typed config, HTTP client, CI skeleton.
# One green smoke test end to end in the pipeline. Ship this first.
# Weeks 3-5 Service layer for the two highest-risk flows, full test-design
# checklist applied, contract testing wired up.
# Weeks 6-8 Interface layer: page objects, shared signed-in state, API seeding.
# FIVE to TEN journeys, not fifty. Emulated mobile web comes free.
# Weeks 9-10 Mobile: emulated web in the merge gate, native smoke nightly.
# Weeks 11-12 Hardening: parallelism, flake hunt, report history, quarantine.
#
# The three requests to make of other teams, in the first month:
# 1. A test-data creation endpoint unblocks parallelism permanently
# 2. Stable test identifiers in the UI kills a whole class of locator churn
# 3. Accessibility ids on mobile one locator for both platformsFoundations, cheap layer, expensive layer, hardening — inverting this order is the common failure mode.
See it in the framework
- Project overview:
README.md— live · reviewed - Implementation · Framework config (entry point):
framework/config.py— live · reviewed - CI · CI pipeline:
.github/workflows/ci.yml— live · reviewed
Reviewed against commit f9ada16 (2026-08-14).
Common pitfalls
- Writing hundreds of interface tests before the pipeline exists, then discovering nothing runs in parallel
- Treating requests to other teams as out of scope, when they are usually the cheapest improvements available
Practice exercise
Write a one-page proposal for automating a real project: current cost, proposed layers, a twelve-week plan, the metrics you will report, and what you will deliberately not automate.