Flaky Test Quarantine: Owners, Expiry, and Nonblocking CI Results
A confirmed flaky test can block unrelated changes without providing a dependable release signal. Removing that obstruction is reasonable only if someone still sees…
A checkout change alters how discounts are rounded. The regression inventory includes payment, refunds, invoices, account access, search, and email checks. A QA lead needs to decide which tests belong in this change's run and which should receive attention first. Those decisions become especially important when the available execution window cannot accommodate the planned suite.
Regression test selection determines planned membership for a change. Test case prioritization determines the execution order of a defined set. Neither decision establishes that a test ran, passed, or detected a defect. A useful regression report connects the selection rationale and intended order with the results and gaps that actually exist when testing stops.
Selection starts with a regression inventory and change evidence, then produces a set of tests to rerun. Tests left out remain in the reusable inventory unless the team makes a separate maintenance decision. Selective regression testing for today's change does not mean permanently deleting everything considered unrelated.
Prioritization takes a defined set and orders its members against an objective, such as earlier feedback on critical behavior. That set can be the full inventory or a subset already chosen through selection. Consequently, teams can apply either technique independently or use selection followed by prioritization.
Decision Criterion | Regression Test Selection | Test Case Prioritization |
|---|---|---|
Main output | Included and excluded tests for this change | Ordered tests from a defined set |
Evidence needed | Change scope, dependencies, valid tests, and inclusion policies | A stated objective, credible ranking evidence, and execution constraints |
What it preserves | The reusable inventory can remain unchanged | Membership of the set being ordered |
Deadline consequence | Excluded tests are outside this run before execution starts | A cutoff can leave later planned tests unexecuted |
What it cannot establish alone | That all affected behavior was included or checked | That early results represent broad coverage or release readiness |
The research distinction is longstanding. The regression-selection work of Graves, Harrold, Kim, Porter, and Rothermel separates choosing tests from executing them, identifying missing coverage, and maintaining the suite. Rothermel and colleagues' prioritization research treats execution order as its own problem. Generating a missing test or correcting an obsolete expected result remains necessary work regardless of how effectively existing tests are selected or ranked.
Consider an illustrative storefront change: MoneyRounder now allocates discounts using basket-level rounding. The team has reviewed existing expected results against the changed contract. The full regression inventory for this small example contains the eight tests below, not every test a real storefront would need. All dependencies, priorities, durations, and later outcomes are invented teaching assumptions, not observed CI or customer results.
Assume recent per-test dependency observations identify direct use of MoneyRounder by T1 and T2. Code review confirms indirect dependencies through refund allocation and invoice generation for T3 and T4. T5 lacks a trustworthy map. The team also retains a mandatory account-isolation guardrail, T6, even though its recorded dependencies do not indicate this change.
ID | Behavior to Check | Scope Decision and Reason | Assumed Minutes | Priority |
|---|---|---|---|---|
T1 | Checkout rounding boundary | Include: direct dependency and changed boundary | 3 | 1 |
T2 | Captured payment equals approved total | Include: direct dependency and financial consequence | 4 | 1 |
T3 | Refund reconciles allocated discount | Include: reviewed indirect dependency | 5 | 2 |
T4 | Invoice tax breakdown reconciles total | Include: reviewed indirect dependency | 4 | 2 |
T5 | Coupon eligibility remains correct | Include: unknown mapping, conservative fallback | 2 | 3 |
T6 | Cross-account order access denied | Include: mandatory team guardrail | 3 | 1 |
T7 | Catalog search ordering | Exclude: reviewed independent search component | 2 | 4 |
T8 | Password-reset email layout | Exclude: reviewed independent nonmonetary template | 3 | 4 |
The selected set is T1 through T6. Its assumed sequential execution time totals 21 minutes, compared with 26 minutes for the full inventory. These totals exclude selection analysis, dependency collection, setup, investigation, cleanup, and reporting. They therefore do not establish an end-to-end time saving.
T5 illustrates a crucial fallback rule: no mapping is uncertainty, not evidence that a test is unaffected. T7 and T8 are excluded only under the assumption that review found no relevant shared-code, configuration, resource, or service changes. A wider change invalidates that rationale and requires reconsideration. Record an owner and review trigger for each exclusion rather than treating yesterday's decision as permanent.
This is a conservative reviewed selection, not a demonstration of a formally safe algorithm. It does not prove that every affected test has been identified. If basket-level rounding introduces behavior absent from the existing cases, the team must design that coverage as well; selecting more old tests cannot create a missing assertion.
For this change, the team wants early evidence about incorrect financial totals and unauthorized order access. Lower priority numbers run first, and equal priorities are ordered by stable test ID. Applying that policy to the selected set gives T1, T2, T6, T3, T4, T5. Applying it to the full inventory produces the same sequence followed by T7 and T8.
Membership has not changed during either sort. T3 and T4 share priority 2, so T3 precedes T4 by the declared tie rule. T6 moves ahead of them because the team's mandatory access-control policy puts it in priority 1. These labels express reviewed judgments, not measured failure probabilities or a mathematically optimal schedule. The risk-based testing guide develops the rationale for combining risk judgments with mandatory checks rather than relying on scores alone.
Other prioritization methods use historical failures or coverage information. A coverage-oriented ordering might prefer tests that exercise additional, previously uncovered branches instead of repeatedly covering the same branches. Such evidence can inform ordering, but reaching code does not establish that an assertion will expose a defect. Likewise, a frequently failing flaky test can supply repeated noise rather than useful early feedback. Review the reliability and relevance of the ranking inputs.
Actual execution constraints also matter. Prerequisite setup must precede tests that need it, and shared environments or specialist availability can restrict the schedule. Our example assumes independent tests with isolated fixtures and ready prerequisites. Without that assumption, a simple priority sort might be infeasible or change the outcomes through test-order dependencies.
Now give the same example a 12-minute execution budget, starting when the first test begins. There is one sequential worker. Assume the listed durations hold exactly for this illustration, and continue independent tests after a failure rather than stopping immediately. The budget excludes the other activities already identified, which require separate capacity in a real plan.
Use an explicit admission policy: start the next test only if its full assumed duration fits the remaining budget. Stop at the first test that does not fit, without backfilling shorter tests from later in the order. This policy is an illustrative scheduling choice, not a universal recommendation. A hard cancellation policy would produce a different record if a test were still running at the deadline.
Plan | Planned Order | Attempted Prefix | Modeled Elapsed Minutes | Planned Tests Not Started |
|---|---|---|---|---|
Full inventory, original order | T1, T2, T3, T4, T5, T6, T7, T8 | T1, T2, T3 | 12 | T4, T5, T6, T7, T8 |
Full inventory, prioritized | T1, T2, T6, T3, T4, T5, T7, T8 | T1, T2, T6 | 10 | T3, T4, T5, T7, T8 |
Selected set, original order | T1, T2, T3, T4, T5, T6 | T1, T2, T3 | 12 | T4, T5, T6 |
Selected set, prioritized | T1, T2, T6, T3, T4, T5 | T1, T2, T6 | 10 | T3, T4, T5 |
In the prioritized plans, T1, T2, and T6 consume 3 + 4 + 3 = 10 minutes. The next test, T3, needs 5 minutes and cannot fit in the remaining 2 minutes. Those 2 minutes remain unused under the declared policy. A 12-minute budget is not evidence of 12 minutes actually spent executing tests. In production, record measured start and finish times instead of substituting estimates or the budget.
For the selected, prioritized run, assume T1 passes, T2 fails, and T6 passes. There are two passing results and one failure requiring investigation. T3, T4, and T5 are still not started. T7 and T8 were excluded before scheduling; they are not part of this run's time-cutoff remainder.
For comparison, assume T3 passes when the original-order plan reaches it. That order obtains refund evidence within the window but leaves account isolation untested. The prioritized order obtains account-isolation evidence instead and leaves refunds untested. Neither ordering checks invoice reconciliation within the window, and both reach the assumed T2 failure. No claim that prioritization finds more defects follows from these invented outcomes.
Three attempted tests out of six selected tests differs from three out of eight tests in the full inventory. Neither count measures requirements coverage, branch coverage, the proportion of defects found, or release readiness. Even a passing T1 establishes only its checked rounding conditions; it does not validate every basket, currency, or downstream calculation.
Keep the status vocabulary explicit in the run record:
None of the example's completed attempts is blocked or skipped. Those categories matter because real reports must not convert unavailable evidence into a passing result. A timeout or cancellation also needs an explicit incomplete or aborted record, including partial activity, rather than being relabeled not started.
Parallel execution needs a different ledger. Summed test durations represent accumulated execution work, not necessarily wall-clock time across workers. Shard order, available workers, shared resources, and in-flight tests at the cutoff determine which evidence exists. Do not reuse this sequential prefix calculation to claim a parallel completion time.
Test impact analysis helps connect a change with tests that might need rerunning. A dynamic map records dependencies observed during earlier executions; it does not automatically describe every future path. Keep the map associated with the reference revision and test conditions, and review how added tests, changed expectations, and newly reachable behavior are handled.
Paul Hammant's 2017 account illustrates this mechanism and describes a then-current implementation that selected impacted tests without prioritizing them. It is useful historical evidence that selection and ordering are separable, not a current feature statement about a vendor's tooling.
Conservative selection requires assumptions that match the application and analysis. Indirect calls, dynamic loading, configuration, resource files, generated code, and changes in external services can broaden the impact beyond a simple changed-source filter. A shared rounding component can affect refunds even when only checkout appears in a feature description. A stale or incomplete map, an unreliable test, or uncontrolled inputs can undermine the selection rationale.
Formal safe-selection results are conditional and relative to the original test suite. The primary selection research describes assumptions including valid prior results, removal of obsolete tests, and a controlled deterministic environment. A homegrown dependency filter does not inherit those guarantees merely because it is called test impact analysis. Nor would preserving an existing suite's fault-detection ability establish that the suite can reveal every defect.
Define what happens when analysis cannot support a narrow decision. Current Microsoft documentation for its scoped VSTest TIA workflow describes falling back to all tests for changes it cannot understand, periodic full runs, and comparison of selected versus full results. That is a documented example, not a claim of compatibility with every framework or deployment. For the storefront, unknown dependencies should trigger inclusion or a broader reviewed run, with enough capacity reserved to perform it. A nightly full-run label is not evidence that the run completed or that every defect would be detected.
A test-management workflow can preserve the reasoning without replacing the underlying dependency analysis. Sherlock Test Management's current product documentation describes comparing Jira Fix Version changes with an approved baseline, proposing scope with reasons, priorities, and assignments for human review, and recording Pass, Fail, or Blocked in Sherlock Runner or supported Jira panels. For this example, that connection helps reviewers distinguish the decision to include T3 from an actual refund-test result. It does not establish code-level impact detection or autonomous CI execution.
Before the next changed-feature run, create a compact decision record:
For the rounding change, the immediate decision is what to do about the T2 failure and the unexecuted refund and invoice checks. Assign investigation and either obtain the missing evidence or document the authorized release restriction or risk acceptance. An early result can be useful while the release remains unready; a shorter list or a better order cannot close that gap by itself.
A confirmed flaky test can block unrelated changes without providing a dependable release signal. Removing that obstruction is reasonable only if someone still sees…
A green automated test history can help a developer identify a safe-looking change while leaving a QA lead unable to answer a different question:…
A sprint can contain carefully estimated testing work and still overload the only person who can perform it. The missing input may be a…
Create traceable test cases, prepare release-specific test runs, and keep approved coverage current as the product changes.