Testing Strategies
The pyramid, and the contract tests distributed systems add to it.
4 to work through
-
intermediate
A team's test suite is slow, flaky and gives little confidence. What shape should the strategy have, and what determines it?
2 min answer -
intermediate Multiple choice
An end-to-end suite has 200 tests. Each fails spuriously about 1% of the time, independently of the others. Roughly what fraction of runs on correct code go red anyway?
2 min answer -
advanced
A product team's test suite is slow and flaky, and removing tests causes escapes. What testing strategy resolves this?
2 min answer -
advanced
An end-to-end suite takes 40 minutes and fails randomly twice a week. What do you change?
2 min answer
3 terms in this topic
Suite Reliability Arithmetic
The calculation that turns a suite's target green rate and its test count into the per-test flake rate each test must meet, which is what determines …
practiceTesting Strategies
Choosing what to test at which level, optimising for confidence per unit of time and maintenance rather than for coverage.
conceptTesting Strategy Shape
The distribution of tests across levels, chosen so that feedback is fast where it can be and confidence is real where it must be.
Neighbouring topics
Software Architecture
General material on the engineering underneath an architecture.
SOLID
Five design principles, two of which scale beyond the class.
Domain-Driven Design
Ubiquitous language, bounded contexts and context mapping.
Bounded Contexts
Where one model ends and another begins, and why forcing one fails.
Clean Architecture
Concentric layers with dependencies pointing only inwards.
Hexagonal Architecture
Ports defined by the domain, adapters supplied by infrastructure.
Microservices
Independent deployability, and the distributed problems it buys.
Modular Monolith
Enforced internal boundaries without a network between them.
Service Boundaries
Drawing lines along change patterns rather than technical layers.
Design Patterns
Reusable solutions at code level, and when they become ceremony.
Refactoring
Changing structure without changing behaviour, in verified steps.
Technical Debt
Deliberate, tracked and repaid — as distinct from mess.
Contract Tests
Capturing what consumers actually use, not what the API documents.
CI/CD
Continuous integration and delivery, and the architecture that caps them.
Release Strategies
Blue-green, canary, shadow and progressive delivery.
Feature Flags
Decoupling deploy from release, with an expiry date.
Trunk-Based Development
Short-lived branches, and unmerged work as inventory.
Code Review
Where architectural rules are enforced by people rather than by tools.
DORA Metrics
Throughput and stability moving together rather than trading off.