Most production defects in a mature product are not new features failing. They are old features that stopped working because something next to them changed: a shared library was upgraded, a field was renamed, an interface started sending a value it never sent before.
Regression testing exists to catch exactly that. This guide covers how to decide what to retest after each change, how to keep a regression suite fast enough that teams actually run it, and how to handle the regressions that unit tests never see, such as interface feeds and vendor upgrades.
What is regression testing in software development?
Need a regression suite you can trust?
Agnotic builds and runs QA programs, including regression suites for products, integrations and vendor upgrades.
Regression testing in software development is the practice of rerunning tests on existing features after a change, to confirm that code which used to work still works. It targets the parts of the system the change did not mean to touch but could have affected, such as shared data, common services and integrations.
It is different from testing the change itself. A new feature gets its own tests. Regression testing asks a separate question: what else might this change have broken, and how do we prove it did not?
Why does a small change need regression testing?
Because software is connected in ways that are hard to see from one file. A change to a date format, a database index or a shared validation rule can break screens and reports that nobody on the team was thinking about.
FDA's General Principles of Software Validation puts it plainly in its section on validation after a change: due to the complexity of software, a seemingly small local change may have a significant global system impact. The guidance expects an appropriate level of regression testing to show that unchanged but vulnerable portions of the system have not been adversely affected.
That guidance is written for medical device software, but the principle holds for any system where a defect reaches patients or money. The phrase to keep is unchanged but vulnerable: regression testing is aimed at what you did not edit.
How do you decide what to retest after a change?
Start from the change and trace outward. Every change has direct dependents, shared data it touches and integrations that consume its output, and those three lists decide the regression scope.
- Direct dependents: Code that calls the changed function, screen or API, found from the code itself and from tracing tools.
- Shared data: Every feature that reads or writes the tables, fields or files the change touches.
- Outbound interfaces: Feeds, exports and APIs whose output could change shape or content.
- Configuration: Feature flags, roles and settings that switch behavior around the changed code.
- Past defects: Areas that broke the last time something nearby changed, from the defect history.
Write the scope down in the pull request or change ticket. A reviewer can then challenge it before the tests run, which is cheaper than finding the missed area in production.
Which tests belong in a regression suite?
A regression suite should hold tests for the behavior that matters most if it breaks, plus every defect that has already escaped once. It should not try to hold every test the team has ever written.
- Critical paths: The workflows the business cannot run without, such as sign-in, ordering, billing and core data entry.
- Escaped defects: A test for each bug that reached production, so the same failure cannot return unnoticed.
- Integration contracts: Tests that check the shape and content of messages and API responses other systems depend on.
- Calculations: Doses, prices, balances, scores and anything else where a wrong number is worse than a crash.
- Permissions: Checks that each role still sees only what it should after a change.
Tag each test by area and risk. Tags let the pipeline run a focused subset for a small change and the full suite before a release, without maintaining two separate suites.
How should regression testing run in agile development?
In agile development, regression testing runs in layers that match the speed of the work: fast checks on every commit, a broader suite on every merge, and the full suite before each release.
- 1. Every commit: Unit tests and the tagged regression subset for the area changed, finishing in minutes.
- 2. Every merge to the main branch: The automated regression suite across services, including API and contract tests.
- 3. Before release: The full suite plus a short exploratory pass on the areas the release touched.
- 4. After release: Smoke tests in production and monitoring that compares key metrics before and after.
The rule that makes this work is that a failing regression test blocks the merge. If teams can merge around red tests, the suite stops being trusted within a few sprints, and then it stops being maintained.
How do you regression test interfaces and vendor upgrades?
Interfaces and vendor upgrades need regression tests built from real traffic, because the defects show up in data, not in screens. A field that moves, a code that changes, or a message that arrives in a new order can break a downstream system silently.
- Recorded messages: Keep a de-identified library of real inbound and outbound messages, and replay it through the changed system.
- Output comparison: Compare the new output with the last known good output field by field, and review every difference.
- Upgrade windows: When a vendor system such as an EHR is upgraded, rerun the interface suite in the vendor's test environment before the production date.
- Edge cases: Include the strange messages that broke things before: empty fields, long names, unusual characters and repeated segments.
Comparison testing is the most valuable technique here. It does not need a person to predict every expected value. It shows exactly what changed, and a reviewer decides whether each change was intended.
How do you keep a regression suite fast and reliable?
Treat the suite as a product with an owner, a time budget and a rule for flaky tests. Suites that grow without those three slow down, start failing at random and get ignored.
- Time budget: Agree how long each layer may take, and split or parallelize when it creeps over.
- Flaky tests: Quarantine a test that fails without a code change, fix it within a set time, or delete it.
- Test data: Build data in each test or from fixed fixtures, never from a shared environment others change.
- Pruning: Remove tests that duplicate others or cover retired features, reviewed every quarter.
- Risk-based depth: Spend more tests on areas where failure hurts most, not on areas that are easy to test.
Regulators take the same view of depth. FDA's Computer Software Assurance guidance applies a risk-based approach to software used in production and quality systems, focusing assurance effort on the functions whose failure matters most. The same logic keeps a product team's suite focused.
What are the common regression testing mistakes?
The common mistakes come from treating regression as a phase at the end instead of a habit on every change. These are the ones we see most often.
- Manual-only regression: A checklist run by hand before release, which takes days and shrinks under deadline pressure.
- Everything every time: A suite so large it runs overnight, so problems are found a day late.
- No escaped-defect tests: The same bug returns because nobody added a test when it was fixed.
- Ignoring integrations: Screens are tested while the feeds other systems depend on change unnoticed.
- Tolerating flaky tests: Random failures teach the team to rerun until green, hiding real regressions.
What are regression testing best practices?
The practices that hold up across teams are small and repeatable. They keep regression testing tied to each change instead of saved up for release day.
- Scope every change: Write the regression scope in the ticket and review it.
- Automate the critical paths first: Start with the workflows and calculations that matter most.
- Add a test per escaped defect: Every production bug leaves a test behind.
- Compare outputs for interfaces: Replay recorded traffic and review every difference.
- Block merges on red: A failing regression test stops the change until it is fixed or the test is corrected.
- Report coverage by risk: Show which high-risk areas have regression tests, not just a total test count.
How Agnotic can help
Agnotic Technologies builds regression suites for products and integrations: change-impact scoping, automated tests for critical paths and calculations, contract tests for APIs, and replay and comparison testing for interface feeds and vendor upgrades. We wire the suite into your pipeline with a time budget and a flaky-test policy so it stays trusted.
For teams with a slow or ignored suite, we start by measuring run time and failure history, then prune, stabilize and rebuild the parts that matter.
Stop old bugs coming back
Plan a regression suite with our QA engineers, or read more software engineering articles in the hub.
Related reading on Agnotic
See the wider testing strategy for health software, test automation, quality practices, DevOps and how HL7 interfaces handle errors.


