How-To10 min read

How to prioritize tests with risk-based testing

By qtrl Team · Engineering

Test suites grow by addition. A test gets written, merged, and from that point on it runs on every PR forever. Nobody deletes tests. Nobody asks whether a test is still worth the pipeline time it costs. The suite gets slower, the signal gets noisier, and eventually the team treats CI as background noise rather than a gate.

The result is a familiar situation: high coverage numbers, long builds, and no way to answer the question "are we actually testing the stuff that matters?"

Risk-based testing starts from the other direction. Instead of testing everything and hoping the important stuff is in there somewhere, you figure out where failures actually hurt and you focus there first.

What risk-based testing is

Risk-based testing is the practice of deciding what to test, how deeply, and how often based on what would actually cause damage if it broke.

It's not a new idea. Safety-critical industries have done this for decades. But most software teams skip it because the test suite grew organically, nobody ever pruned it, and adding one more test always felt easier than asking whether each test earns its keep.

Not all bugs are equal, though. A broken checkout flow costs you revenue every minute it's down. A misaligned icon on a settings page might sit there for months before anyone notices. Your testing effort should reflect that difference.

Why "test everything" stops working

The first hundred tests are fine. They run fast, they cover the core paths, they all make sense.

By the time you hit a thousand, things look different. CI runs take thirty minutes or more. Parallel runners help, but they cost money and add complexity. Developers start pushing code without waiting for the full suite. The flaky tests you never fixed are still in there, failing randomly, training everyone to hit retry.

Coverage is 80%. The number looks great in a slide deck. But nobody can tell you whether those tests actually protect the flows that matter or whether they're just checking a pile of rarely-used admin screens you built two years ago.

This is the wall described in why manual testing breaks at growth stage. The problem isn't a lack of tests. It's a lack of focus.

Step 1: Map your critical paths

Start by listing the user journeys where a failure would hurt the most. Not the ones that are most complex technically. The ones tied to money, data integrity, or security.

For most B2B SaaS products, the list looks something like this:

  • Signup and onboarding
  • The core value action (the thing users pay for)
  • Billing, payments, and subscription management
  • Authentication and authorization
  • Data import and export

For e-commerce: search, add to cart, checkout, payment, order confirmation.

You probably already know what your critical paths are. Write them down. That's the list you're going to protect first.

Step 2: Score by likelihood and impact

For each area of your product, ask two questions:

  • How likely is this to break? Look at code churn, defect history, complexity, and how many people are actively touching the code.
  • How bad is it when it does? Think revenue loss, data corruption, security exposure, customer trust.

You don't need a spreadsheet with weighted formulas. A simple high/medium/low for each dimension is enough. Map them on a grid:

  • High likelihood + high impact: Test heavily, automate first, run on every PR
  • High likelihood + low impact: Automate, run nightly
  • Low likelihood + high impact: Cover the critical path, run on every PR, but fewer tests needed
  • Low likelihood + low impact: Minimal coverage or skip entirely

The point isn't precision. It's forcing a conversation your team probably hasn't had: which failures do we actually care about?

Step 3: Tier your tests

Once you've scored your risk areas, go through your existing suite and tag each test by the tier it belongs to.

Tier 1 runs on every PR. These are your checkout flows, auth, payment processing, core product actions. If a Tier 1 test fails, you don't merge. Full stop.

Tier 2 runs nightly or on release branches. Settings pages, user management, non-critical integrations. You want to know when they break, but not on every commit.

Tier 3 is weekly or before major releases. Edge cases, admin tools, low-traffic features. Useful, but running them on every PR wastes pipeline time.

Then there's the stuff you should probably delete. Tests covering deprecated features. Tests nobody can explain. Tests that flake constantly and nobody fixes. A test nobody maintains isn't protecting you. It's slowing you down and teaching the team to distrust the suite.

If you're not sure whether to delete a test, quarantine it for two weeks and see if anyone notices it's gone.

Step 4: Automate the top tier first

If you're building out automation, start with Tier 1. Every time.

The instinct is to automate the easy things first: the simple CRUD screens, the straightforward forms. But those are often low-risk. You end up with a fast, green suite that protects nothing important.

Invest your automation effort where the risk is highest. A single reliable test on the checkout flow is worth more than twenty tests on the profile settings page.

This pairs with the framework decision covered in how to get started with test automation. Pick the framework once, then focus on what to automate, not how much.

Step 5: Reassess after every major release

Risk isn't static. A feature that was stable last quarter might be under active development this quarter and needs more coverage. A third-party integration you barely tested might have started failing since the vendor pushed an update.

Build a cadence for reviewing your risk map. Monthly works for most teams. When you review, look at:

  • Where did bugs actually escape to production?
  • Which areas had the most code churn?
  • Which tests caught real issues vs. which ones just ran green and took up time?

This is also when you prune. Move tests between tiers. Delete the ones that don't earn their place. A healthy suite stays lean and intentional. It doesn't grow without limit.

Where AI changes the math

The manual version of risk-based testing works well for a team of ten. You know the product, you know where the risk sits, and you can tag tests by hand.

At scale, it gets harder. The codebase moves fast. Code churn data lives in git, defect data lives in the issue tracker, test results live in CI, and nobody has a unified view. The risk map falls out of date within weeks.

This is where AI-driven prioritization starts earning its keep. A model can analyze a pull request, look at which files changed, check defect history for those areas, and predict which tests are most likely to catch a regression. Instead of running the entire suite, you run the tests that matter for this specific change plus your Tier 1 safety net.

You get faster feedback without giving up the tests that matter. And the model gets better over time as it sees which predictions were right.

Agentic testing shifts the question entirely. Instead of selecting which existing tests to run, AI agents can explore areas of your product that your current suite doesn't cover and surface risks you didn't know about. The question stops being "which tests should I run" and becomes "what should we be testing that we aren't?"

Common mistakes

The most common one: scoring everything as high risk. If everything is high priority, nothing is. Most products have five to ten truly critical paths. The rest is important but not critical. Be honest about the difference.

Another trap is treating the risk map as a one-time exercise. The map goes stale the same way test data goes stale. A risk map from six months ago is a snapshot of a product that no longer exists.

Teams also tend to ignore their own defect data. Your bug tracker already has the answers. The areas with the most escaped defects last quarter are, by definition, where your testing is weakest. Start there.

And the sneaky one: over-investing in low-risk automation because easy tests are satisfying to write. You end up with a green suite full of low-risk checks that gives you confidence without corresponding safety.

Where to start this week

Pick your five most critical user journeys. Write them in a shared doc. For each one, check: do you have automated tests covering the happy path? Are they in your top tier, running on every PR?

If the answer is no for even one of them, that's your first priority. Not more tests. Better-aimed tests.

Frequently asked questions about risk-based testing

What is risk-based testing? Risk-based testing prioritizes test effort by business impact and failure likelihood. Instead of trying to test everything equally, you focus your deepest coverage on the areas where a bug would cause the most damage and scale back on areas where failures matter less.

How do I decide which tests are high priority? Ask two questions for each area: how likely is it to break (based on code churn, complexity, and defect history) and how bad is it when it does (based on revenue impact, data integrity, and security exposure). High scores on both dimensions mean it belongs in Tier 1.

Doesn't this mean you skip testing some things? Yes. That's the point. Testing everything equally is a resource problem disguised as a quality strategy. By testing less in low-risk areas, you free up time and compute for the areas that need it most.

How often should I reassess my risk priorities? Monthly works for most teams. Also reassess after major incidents, large feature releases, or when a previously stable area starts producing bugs.

Can AI help with test prioritization? Yes. AI models can analyze code changes, correlate them with defect history, and predict which tests are most likely to catch a regression for a given PR. This lets you run a smaller, more targeted suite on every commit while keeping the full suite for nightly or release-candidate runs.


qtrl combines AI-powered test agents with structured test management, so you can organize tests by risk, run the right tests on the right triggers, and let AI surface coverage gaps you haven't thought of. Start free with qtrl or read more about why structured test management still matters.

Have more questions about AI testing and QA? Check out our FAQ