Regression Testing in Software Testing

Regression testing software re-runs tests after a change to catch lost behaviour.

Regression Testing in Software Testing
Written by TechnoLynx Published on 12 Jun 2026

Regression testing means re-running functional and non-functional tests after a change to confirm that software which already worked still performs as expected. The software behind those re-runs spans test management, automation, execution, development and continuous integration tools. These are assembled as a stack, not bought as a single product. The discipline carries over to AI models, but exact-match assertions give way to semantic evaluation against regression baselines. A model’s output for the same input is not fixed, and its behaviour can change without anyone touching the code.

What Regression Testing Software Checks After a Change

A regression test looks for features that used to work and have now degraded or disappeared, including old bugs that have come back. Most of these failures are side effects. New code collides with existing code that nobody meant to change. The changes that can trigger them go well beyond feature work: bug fixes, enhancements, configuration changes and even swapping out electronic components.

Non-functional regression tests check performance, security and reliability, and they present additional challenges. One reason is that a performance regression can leave every functional test green: the software still works, it just runs slower or uses more memory than it did before. Performance results also vary between runs, so someone has to decide whether a change counts as a regression. Statistical significance tests and change-point detection are sometimes used to help with that call.

Regression testing is inherently costly. A 2026 exploratory study by Pascoal, Magalhães and de Souza Santos summarises prior studies as reporting that regression testing consumes between 50% and 80% of the total verification or maintenance budget. Commercial software development generally treats it as the largest test effort, because it has to recheck many details of features that already shipped. Regression test selection techniques exist to reduce that expense.

Why Is It Called Regression Testing?

Regression testing seeks to uncover software regressions. A software regression is a bug where a feature that worked before stops working correctly, typically after source changes such as new features or fixes. The software has gone backwards, and the test checks for that backward step.

The usual taxonomy has three kinds of regression:

  • Local: the change introduces a new bug in the module or component that was changed.
  • Remote: a change in one part of the software breaks functionality in a different module.
  • Unmasked: the change exposes a bug that already existed but had no effect before.

The taxonomy maps onto test levels. Unit tests catch local regressions and integration tests catch remote ones. Unmasked regressions have no test level of their own in that mapping: the bug was already there before the change.

How Is Regression Testing Different from Unit Testing and Retesting?

A unit test validates isolated source code at component level. Unit test code is commonly maintained with the project code, run on each build, and run as part of regression testing. So a unit test can also be a regression test. The words describe different properties, not competing activities.

Retesting is different. Regression testing looks for bugs you do not expect to find, and retesting checks for a bug you do expect. One practitioner in the Pascoal et al. study describes the two working together: a fix only goes to production once the bug has been retested, and the next cycle runs only the tests that failed in the previous regression.

  Unit testing Retesting Regression testing
Question it answers Does this isolated component behave as specified? Is this known defect actually fixed? Did this change break anything that used to work?
Scope One unit, dependencies blocked The failing cases Unchanged functionality across the system
Expected outcome known? Yes, the expected behaviour Yes, the bug should be gone Yes, the previous behaviour

The Main Types of Regression Testing, and When Each Is Used

There are two separate questions here: how much of the system a regression run covers, and how deep it goes.

By scope, a common split has three types. Unit regression runs during unit testing, with the unit’s dependencies blocked so it can be tested on its own. Partial regression checks that changed code still works once it is integrated with the unchanged code around it. Complete regression regresses the product as a whole. It is used when a change touches many modules or when nobody can say what else the change might affect.

By depth, the choice depends on risk and timing. Changes made late in a release, or deemed risky, call for complete testing. Low-risk changes early in the cycle may only need shallow positive tests on each feature.

Timing follows the release cadence. When a release takes months, regression tests belong in the daily test cycle. When releases are weekly, the regression run can follow functional testing of the changes. In agile work, regression testing has to run continuously or close to it, not once near delivery.

Retest-All, Selection, Prioritisation and Minimisation Under a Time Budget

Retest-all reruns every test case in the suite. Because nothing is skipped, it checks the integrity of the whole current program after the change. It is also expensive. The other techniques are ways to avoid paying that price on every change:

  • Regression test selection runs only part of the suite. It pays off when choosing the subset costs less than running everything.
  • Prioritisation orders the tests so that faults surface as early as possible in the run.
  • Minimisation tries to find the smallest set of tests that still does the job.
  • Hybrid approaches combine selection and prioritisation, re-running the selected tests in priority order.

Researchers formalising regression testing for agile work call the time available for regression testing the regression testing window. That window is what forces selection or prioritisation when the full suite cannot run. As the window grows, the scope of regression testing can grow with it.

Selection is a trade-off, not free savings. Selecting tests costs analysis time, and a technique can drop exactly the test that would have revealed a fault. The classic empirical comparison by Graves et al. in ACM TOSEM puts numbers on this. On the programs studied, a safe selection technique found every fault the suite could reveal while selecting 60% of the test cases at the median. At the median, minimisation-selected suites found 16% of the faults retest-all would have found. Random suites only slightly larger than minimised ones matched minimisation’s fault detection at little analysis cost. The authors also found that results depended on the program, the type of change and how the test suite was built. Treat these figures as evidence about the trade-off, not as rates to expect in your own codebase.

When picking tests by hand, sources name criteria such as core functions, frequently used features, changed modules, environment-sensitive code and previously defective code.

Which Regression Testing Tools to Use, and How to Choose Between Them

No single tool covers regression testing. Each test type (unit, component, functional, non-functional) needs its own tooling, so in agile and DevOps teams regression testing runs on a stack of tools. Practitioners in the Pascoal et al. study sorted their tools into five categories: test management, automation, execution, development and continuous integration.

Layer What it does Examples named in the sources
Automation frameworks Script and run test cases Cypress, PyTest, Robot, Behave, Playwright, Appium
CI / pipeline orchestration Trigger regression runs on builds or schedules Jenkins, CircleCI, TFS, Bamboo, TeamCity
Test management and tracking Traceability and reporting JIRA, Zephyr, Azure DevOps
Codeless / record-and-playback Build tests by recording navigation or writing plain language No product named in the sources

For choosing among them, the sources point to three criteria. First, integration: if a CI/CD pipeline exists or is planned, the automation tools must fit into it. Teams in the study reported that tracking tools were only as useful as their fit with existing pipelines and the team’s technical maturity. Second, maintenance: the regression suite changes constantly, so the tool has to make updating it easy. Stable identifiers, stable test environments and modular, centrally updatable test components keep that maintenance cost down. Third, coverage of real needs: list every capability each team member needs before comparing products, because the gaps in that list show where a second tool has to fit in.

Run each new automated test several times and confirm it passes reliably before it joins the regression suite, because false failures waste time. A suite people have learned to ignore no longer protects anything.

Can AI Pick or Write the Regression Tests?

AI-driven testing methods generate test cases, adapt to changes and use machine learning to find high-risk areas of the codebase. RETECS, for example, uses reinforcement learning to prioritise and select tests across CI cycles using only test metadata such as past verdicts and durations. It typically converges on an effective strategy within 60 cycles. Like any selection technique that is not safe, it can drop a test that would have revealed a fault.

How a Software Regression Suite Carries over to AI Models

The purpose carries over unchanged: confirm that a change did not break behaviour that used to be acceptable. What breaks is the assumption underneath. Traditional testing relies on deterministic behaviour and well-defined test oracles, and machine learning systems violate both. Outputs vary with stochastic inference or retraining, and correct behaviour is often defined statistically. Even at temperature zero, LLM APIs have been observed to give non-deterministic outputs. The researchers who formalised regression testing for CI list data-driven drift and non-deterministic model weights among the challenges their model does not yet cover.

Ma et al. argue that regression testing LLMs requires fundamental changes to traditional testing approaches.

Software regression concept AI model regression counterpart
Fixed expected output per test A reference answer or rubric, plus an acceptance threshold set by risk tolerance
One failing test means a bug A failure when a slice-level metric moves beyond a threshold
Previous version as the oracle Regression baselines: reference scores each new run is compared against
Re-run on code change Re-run on a change of model version, prompt template, retrieval ranking or underlying corpus
Each test run gives a binary pass or fail Repeated runs per input, sorted into consistent pass, flaky or consistent failure
Old bugs coming back Previously failing inputs that were fixed, checked first after a model update
Pass/fail release gate A gate plus scheduled and event-triggered runs, read as a score trend

A Model Update Can Regress Even When Accuracy Goes Up

In traditional software, a single breaking regression test indicates a bug. Model regressions can hide inside a better headline number. In their 2023 study of LLM API updates, Ma et al. found that 58.8% of prompt and model combinations lost accuracy over an update. They also found that 10.9% of individual predictions went from correct to wrong. In 87.9% of updates that improved overall accuracy, at least one previously correct prediction regressed.

The machine learning literature calls these negative flips: samples the old model got right and the new one gets wrong. Yan et al. (CVPR 2021) argue that reducing the overall error rate is neither necessary nor sufficient for reducing negative flips. In their example, two ResNet152 models with the same 78.3% ImageNet accuracy disagreed on 10.4% of validation samples. Fine-tuning from a common pretrained model did not prevent the problem either: they measured a 7% negative flip rate fine-tuning on iNaturalist without treatment. Apple’s MUSCLE paper reports negative flips of more than 60% in some LLM base-model updates, with more flips when the performance gain between versions was smaller.

For a regression suite, the practical consequence is that aggregate accuracy before and after an update hides instance-level regressions. Compare predictions instance by instance against the old model, and define the pass condition over data slices, not single predictions or the whole dataset. Ma et al. found regressions concentrated in particular slices: 90% of regressions fell on toxic discussions, which made up only 42.5% of the dataset.

Silent Drift: The Regression Nobody Committed

In traditional software, a pinned library version keeps behaving the same. With cloud-hosted models, providers update and deprecate on their own timelines. Chen, Zaharia and Zou compared the March and June 2023 versions of GPT-4. Its accuracy at identifying prime versus composite numbers fell from 84% to 51% on the same questions. Their conclusion was that the “same” LLM service can change substantially in a short time, which calls for continuous monitoring. A regression suite that runs only when your own code changes does not run when the provider changes the model. Catching drift in production overlaps with what model monitoring metrics miss after deployment.

Frozen Suites, Baselines and What Triggers a Run

One LLM test-strategy paper proposes a frozen regression suite: a compact set of high-value cases covering core workflows and previously observed failures, built from factual, policy, privacy and bias tests. The suite runs automatically when the model provider or version changes, when prompt templates or retrieval ranking change, or when the document corpus has major updates. Each new configuration’s outputs are compared with prior baselines using the same oracles. The goal is to detect broken constraints (new factual errors, weaker refusals, more leakage), not to enforce identical text.

Three change scenarios need different handling. A model swap with unchanged prompts still means every prompt has to be re-tested, because the model interpreting those prompts is now different. Every prompt change is a code change and needs its own evaluation run. When both change at once, validate the new model against the existing prompts first, and introduce prompt changes only once that baseline is stable. Not every change needs the full suite. Tiered change management can trigger full regression for a provider switch and a focused subset for a minor prompt tweak. That is the AI version of the retest-all versus selection decision above.

Scheduling is also different. The AI Assurance strategy paper recommends running the evaluation pipeline both on a schedule (at least daily) and on events such as a model version change or prompt update, and reading the output as a score trend, not a pass count. The paper advises tying thresholds to decisions such as blocking a release, requiring review or opening an incident. The release-gate side of this is covered in the four gate signals for shipping an AI feature. The drift-before-release case is worked through in regression testing for production AI. Agents that keep learning after deployment raise their own version of the baseline problem, covered in regression testing reinforcement learning agents.

Regression Suites as Reliability Artefacts, Not a Test Phase

Production AI systems regress in ways unit tests cannot catch, such as silent quality drift after model updates and failures on rare classes. We treat the regression suite as one of the MLOps engineering artefacts that catch these failures before customers do, alongside eval harnesses and drift detection, and as separate from the question of model accuracy. The researchers who formalised CI regression testing note that extending it to ML would require versioned datasets and trained models in each build, plus separate windows for retraining and inference validation.

The question every team still has to settle is where to set the threshold. Perfect evaluation scores are often out of reach, so the acceptance boundary has to come from domain-specific risk tolerance. No test strategy removes all uncertainty about model behaviour. The realistic goal is to reduce risk to an acceptable level and document what remains. In deterministic software, a green suite shows correctness under the tested conditions. In AI, a green suite means the tested behaviour held this time, within a tolerance someone chose, and the regression suite is only as trustworthy as that choice.

FAQ

Which Software Is Best for Regression Analysis?

Regression analysis shares the word “regression” with regression testing but is a different subject with different tools. For regression testing, no single product is best: teams combine automation, CI and test management tools that fit their pipeline.

What Is AI Software Testing?

The term covers two things. One is using AI to generate and prioritise tests for conventional software. The other is testing AI systems themselves, which combines offline evaluation, scenario-based testing and human review in place of a single pass/fail test phase.