Reduce a regression test suite without losing unique failure coverage
Use test pruning to address redundant tests and over-testing. Check test smells, preserve unique failure coverage, and measure runtime during regression test suite maintenance.
Start with the passing regression suite on a fixed commit. Record its median duration over comparable runs, test identities, inputs, assertions and the past incidents it is expected to catch. Flag environment-specific cases, accessibility checks and contractual acceptance tests with their owners. A shared line-coverage percentage alone cannot show which failures two tests detect.
skilldb get testing-services-skills/regression-test-suite-reductionFull skill: 20 linesReduce a regression test suite without losing unique failure coverage
Establish what the suite protects
Start with the passing regression suite on a fixed commit. Record its median duration over comparable runs, test identities, inputs, assertions and the past incidents it is expected to catch. Flag environment-specific cases, accessibility checks and contractual acceptance tests with their owners. A shared line-coverage percentage alone cannot show which failures two tests detect.
Compare a small cluster
Group cases around one behavior. Make a table with one row per test and one column per historical regression or representative fault. On a disposable checkout, reintroduce each known defect or use a mutation tool on the relevant code. Mark a cell only when the test fails for the expected reason. Keep timeouts, unstable outcomes and equivalent mutations separate. Restore the original and verify green before evaluating a different fault.
For example, a shipping rule waives fees at ten items. Three tests use ten, eleven and twelve items. A change from greater-than-or-equal to strictly greater is detected only by the ten-item boundary case. A separate failure that breaks all above-threshold orders may be caught by both eleven and twelve. Before proposing removal, check that those two cases share customer type, execution path and contract.
Trial the reduction
Remove one redundant case on a branch, rerun the green baseline, then repeat the same fault matrix. Keep the boundary case if it is the sole detector of a known failure. Retain any test with an unexplained difference and investigate it separately. Compare runtime using the original runner settings. Record the proposed deletion, retained detector, incident reference and timing, and make each removal easy to revert. Where the cases exercise different platforms or public contracts, preserve both until those obligations are independently covered.
Install this skill directly: skilldb add testing-services-skills
Related Skills
Use SonarQube for Code Quality Gates
Design a focused SonarQube quality gate, verify new-code and coverage attribution, and distinguish completed analysis from a passing CI gate.
Storybook Test
Storybook Test: component testing via play functions, interaction testing, accessibility checks, visual regression, test-runner, portable stories
Testing Library
Testing Library: React/DOM testing, queries (getBy/findBy/queryBy), user events, screen, waitFor, render, accessibility-first
Vitest
Vitest: unit/integration testing, Vite-native, mocking (vi.mock/vi.fn), snapshots, coverage, workspace, in-source testing, benchmark
Cypress
Cypress: end-to-end/component testing, commands, intercept (network mocking), fixtures, custom commands, CI, retries
K6
k6: load testing, performance testing, stress testing, soak testing, thresholds, checks, scenarios, browser testing, CI integration