Skip to content

Risk-Based Testing: How to Prioritize What to Test First

ILIA KARPENKO5 min read

Risk-based testing is a strategy for deciding how much test depth each part of a system gets, based on the likelihood that it breaks and the damage it does if it breaks. Instead of giving every feature the same number of test cases, you score each one and spend the most testing time where the score is highest.

The need for this shows up the moment a release has more scope than a team has time to test. A sprint touches checkout, a settings page, and an internal admin report. All three need some testing before ship, but they don't need the same testing, and a team that treats them equally either ships checkout under-tested or burns three days testing a report four people use. Risk-based testing exists to make that tradeoff on purpose instead of by whoever finished their assigned area first.

How to score risk

Score each feature or requirement on two axes, then multiply them.

Likelihood is how probable a defect is in that area. New code, complex logic, and anything recently changed score higher than a stable module nobody has touched in months. A payment integration written last sprint carries more likelihood than a footer that hasn't changed in a year.

Impact is what happens if a defect ships. Revenue loss, data corruption, a legal or compliance violation, and anything visible to every user score high. A cosmetic misalignment on a rarely-visited settings page scores low, even if it's real and worth fixing eventually.

Multiply the two on a simple scale, 1 to 5 each, and you get a risk score from 1 to 25. That number is not a precise measurement. It's a forcing function that makes the team state, out loud, why one area gets more attention than another, instead of leaving the split to habit or whoever's loudest in planning.

LikelihoodImpactScoreWhat that means for test depth
5 (new, complex payment logic)5 (money moves incorrectly)25Full test design: equivalence classes, boundaries, negative paths, a peer review of the plan
4 (recently refactored search)2 (wrong result order, no data loss)8Core paths and the two most likely failure modes, no exhaustive edge-case sweep
2 (stable admin report, untouched in months)3 (wrong numbers mislead an internal decision)6Smoke test plus the last time it changed, revisit if it changes again
1 (unchanged footer link)1 (cosmetic, no user impact)1Skip a dedicated pass; catch it in general exploratory testing if at all

The score doesn't hand you a case count. It hands you a rank, and the rank tells you where to put a QA engineer's limited hours before the rank tells you anything else.

Free and open sourceCasely writes these cases for youAttach a spec and one file of your team's existing test cases in Claude. Casely copies your columns, names the gaps it found in the spec, and exports a single Excel file your tracker imports in one pass.Read the install docs

Where the inputs come from

A risk score is only as good as what feeds it, and three sources cover most of what matters.

Code churn and complexity. Files changed frequently, or changed by many different people, carry more defect risk than stable ones. Static analysis and git history both surface this without anyone having to guess.

Business criticality. Ask what a defect in this area costs: lost revenue per hour of downtime, a support ticket flood, a regulatory fine, a headline. A team that has never priced this out for its own product is scoring impact from intuition, and intuition tends to underrate the boring-looking area that actually moves money.

Past defect history. A module with a long bug-fix log stays risky even after each individual bug gets fixed, because whatever made it error-prone in the first place, tangled dependencies, unclear ownership, unusual state handling, is still there. Treat a history of bugs as a standing likelihood signal, not a closed chapter once the last ticket resolves.

Where it fails

Risk-based testing breaks down in a few predictable ways.

Scoring by opinion instead of evidence. A risk matrix filled in during a five-minute planning discussion, with no churn data, no incident history, and no business-impact number behind it, produces a ranking that just reflects who spoke last. The matrix is only a forcing function if the inputs are real.

Low-score areas accumulate untested debt. A feature that scores low every sprint can go a year without a real test pass. That's the intended tradeoff, but it needs a floor: a periodic full sweep, quarterly or per major release, catches what individually-low scores let slide for too long.

Impact estimates go stale. A feature that shipped as a minor internal tool can become business-critical eighteen months later without anyone updating its risk score. Re-score when usage or business context changes, not just when the code changes.

It doesn't replace test design. A high risk score tells you a feature deserves deep testing. It doesn't tell you what the test cases should be. Equivalence partitioning, boundary value analysis, and decision tables still do that work once the score has told you where to point them.

What risk-based testing replaces, and what it doesn't

Risk-based testing is a resource allocation decision, made before test design starts, not a technique for writing individual cases. It answers "how much depth does this area get," the same way impact analysis answers "which existing tests does this change require." Pair the two: risk scoring sets the depth for new feature work, impact analysis sets the scope for a regression run once that work ships, and equivalence partitioning or decision tables fill in what the cases actually check once the depth and scope are set.

What's worth automating

Pulling churn data, incident history, and dependency counts into a single score is exactly the kind of aggregation tooling does faster and more consistently than a planning meeting does from memory. Deciding what a defect in a given area actually costs the business, and how much residual risk the team is willing to carry on the low-scoring areas, stays a judgment call for the people who own the product and the ones who'll get paged when a score turns out to have been wrong.

Open sourceThe skill lives on GitHubMIT licensed, no account, nothing to install on your machine. Star it if it saves you an afternoon.View the repository