World’s largest virtual agentic engineering & quality conference
Regression testing re-runs passed tests after code changes to catch broken features. Learn the types, techniques, real examples, and how to automate it.

Irshad Ahamed
Author

Himanshu Sheth
Reviewer
Last Updated on: August 3, 2026
On This Page
Regression testing is the practice of re-running test cases that already passed, after a code change, to confirm the change did not break existing functionality.
It applies to bug fixes, new features, configuration updates, and environment migrations, and it runs either manually or automated.
The distinction that matters: regression testing does not check whether the new code works. It checks whether everything that already worked still works.
Overview
How Often Should You Run Regression Tests
Run a prioritized subset on every pull request, the full suite after each merge, and the complete browser matrix nightly.
Who Is Responsible for Regression Testing
Ownership is split across four roles, each covering a different layer of the suite.
Regression testing ensures software stability after modifications. Its primary goal is to catch regressions, where updates inadvertently reintroduce or create new bugs.
This guide covers what regression testing is, when to run it, and a worked example built from real test cases.
You will also get the techniques and types, how AI is changing test selection, and the practices that keep a suite maintainable.
Regression testing re-runs test cases that already passed, after a code change, to verify that recent code modifications have not broken any of an application's existing functionality.
Regression testing is the process of re-evaluating a software application after changes have been made to ensure that existing functionalities remain intact, and it is called Regression Testing.
In the software development lifecycle, regression testing verifies that recent code modifications have not negatively impacted an application's current functions.
Confirming that no new flaws appeared requires methodically rerunning previously executed test cases against the updated codebase.
When a new build is validated, testers run functional testing to verify modifications in existing and newly added functionality.
Regression testing follows. It determines whether those improvements caused a defect in behaviour that was satisfactory before the latest alterations.
One of the most important aspects of quality assurance is establishing strong regression test procedures, which guarantee that software is developed with the utmost reliability and integrity throughout the whole development process.
Regression testing matters because dependencies between code segments mean one change can break an unrelated feature, and shipping that breakage costs far more than catching it before release.
Regression testing matters whenever new code is added or defects are corrected, because new and old functionality have to coexist.
Dependencies between code segments are what make the check crucial, which is why teams scope the retest with impact analysis in testing first.
Last-minute system changes raise the stakes further, since no time remains to discover that the original code broke.
Continuous enhancements or alterations in the product can potentially disrupt previously tested code, leading to unforeseen bugs. Failing to test such code changes may result in critical issues in the live environment, causing inconvenience for the customer.
Let us consider an online website. You report an issue that the cost of a product for sale is not getting displayed correctly, that is, a lesser price is replacing the actual cost of a product. You conclude that this issue must be fixed as soon as possible.
Now a developer fixes the issue. The price on the reported page changes, but the summary page may still carry the wrong cost.
Worse, the email sent to the client can repeat the same error. After the fix, the reported page and every related page must be checked.
That is precisely why regression tests exist.
The below graph shows the importance of running a regression test.

Regression testing runs whenever production code changes: after new features, bug fixes, performance work, configuration updates, environment migrations, and before every release candidate ships.
Every scenario that involves alterations in the production code necessitates regression tests. All the following scenarios have the requirement for this testing.
Take an order management product. One function triggers dispatch, acceptance, and confirmation emails when a user clicks the Dispatch, Accept, and Confirm buttons.
During development, the confirmation email starts failing. It sends, but the order total inside it is wrong.
A developer traces the bug to the order-total helper and patches it. Retesting the confirmation email confirms the fix. That is where most teams stop, and that is where the regression escapes.
The same order-total helper is called by the dispatch email, the acceptance email, the order summary page, and the invoice PDF.
A change to it can break any of them. Regression scope is not the confirmation email; it is every consumer of the code that changed.
That is the question impact analysis answers before a single test runs.
Here is what the resulting regression test cases look like for that one-line fix. Note that only the first row is retesting; everything below it is regression testing.
| ID | Module | Test steps | Expected result | Priority |
|---|---|---|---|---|
| RT-01 | Confirmation email | Place an order for 3 items with a coupon, click Confirm, open the email | Email total matches the cart total, including discount | P1 (retest) |
| RT-02 | Dispatch email | Mark the same order as dispatched, open the dispatch email | Total is unchanged from the confirmed order | P1 |
| RT-03 | Acceptance email | Accept the order, open the acceptance email | Total renders and matches the order record | P1 |
| RT-04 | Order summary page | Open the order in the account area | Subtotal, tax, and grand total match the confirmation email | P1 |
| RT-05 | Invoice PDF | Download the invoice for the order | Grand total matches the order summary page | P2 |
| RT-06 | Zero-total edge case | Place a fully discounted order, confirm it | Total shows 0.00, not a blank or negative value | P2 |
RT-06 is the case teams most often miss. A rounding or currency fix frequently breaks boundary values rather than the common path.
A regression suite covering only happy paths will pass while the defect ships.
Once the cases are stable, tag them so the suite can be selected rather than run whole. In TestNG, groups do this cleanly:
public class OrderTotalRegressionTest extends BaseTest {
@Test(groups = {"regression", "p1"})
public void confirmationEmailTotalMatchesCart() {
Order order = orders.placeOrder(3, "SAVE10");
Email email = mailbox.waitFor(order.id(), EmailType.CONFIRMATION);
Assert.assertEquals(email.total(), order.cartTotal());
}
@Test(groups = {"regression", "p1"})
public void dispatchEmailTotalIsUnchanged() {
Order order = orders.placeOrder(3, "SAVE10");
orders.dispatch(order);
Email email = mailbox.waitFor(order.id(), EmailType.DISPATCH);
Assert.assertEquals(email.total(), order.cartTotal());
}
@Test(groups = {"regression", "p2"})
public void fullyDiscountedOrderShowsZeroTotal() {
Order order = orders.placeOrder(1, "FREE100");
Email email = mailbox.waitFor(order.id(), EmailType.CONFIRMATION);
Assert.assertEquals(email.total(), Money.of("0.00"));
}
}The suite file then decides what a given pipeline stage runs. A pull request build can run only p1, while the nightly build runs the full regression group:
<suite name="PR-Regression" parallel="methods" thread-count="10">
<test name="critical-path">
<groups>
<run><include name="p1"/></run>
</groups>
<packages>
<package name="com.shop.tests.regression"/>
</packages>
</test>
</suite>This is the smallest useful version of regression test selection. The group tag is the selection signal, and Cypress parallel testing shows how parallel runs keep runtime flat as the suite grows.
Note: Only RT-01 in that table is retesting. Every row below it exists because the changed helper is shared, which is exactly what impact analysis is meant to surface.
Performing regression testing takes five steps: detect what changed, run impact analysis, select and prioritize affected cases, split them across manual and automated runs, then execute by priority.
Every organization uses a different strategy or Regression Test Suite. Nonetheless, the majority adhere to a few basic steps, which are as follows:

Detect alterations in the source code
Carefully find and examine source code optimizations and alterations in this step. Subsequently, a comprehensive evaluation of the impacted components and their influence on the key elements of the product are conducted.
Prioritize Test Cases
Choose specific test cases that cover the critical functionalities of the application. These test cases should represent typical user actions and how they interact with the software. Prioritize the most important test cases based on their impact on the system.
Test Estimation
Test estimation in regression testing involves determining how long it will take to execute the entire suite of test cases. This helps in planning resources and schedules effectively for a comprehensive regression testing process.
Categorize test cases (manual & automated)
Testers should select between manual and automated testing based on the number of test cases once they are done with time estimation.
Test Execution
Finally, all test cases are executed in the order of priority to find defects and ensure that the application is working correctly. Test execution is the phase where pre-defined test cases are run against the updated codebase to ensure that new changes haven't introduced any regression issues.
No single tool covers a regression suite end to end. You pick a driver for the application type, then an execution layer that runs the suite fast enough to gate a release.
The options below are the ones most regression suites are actually built on.
Selenium: a leading tool for cross-platform regression testing, specializing in web application automation. It supports data-driven testing and suits large teams with experienced testers.
Playwright: Playwright testing is a flexible tool that works with several browsers and is useful for regression testing web applications.
Puppeteer: Similar to Playwright, Puppeteer testing is proficient at doing regression testing on web applications in a variety of browsers.
Appium: Appium mobile testing plays a key role in regression testing iOS and Android apps to guarantee maximum functionality.
TestMu AI: a cloud test execution platform built around the constraint that defines regression testing at scale, which is suite runtime.
It runs your existing Selenium, Cypress, and Playwright suites across 10,000+ browser and OS combinations in parallel.
The point is that adding regression cases stops adding wall-clock time. Suite growth becomes a cost decision rather than a release-blocking one.
Setup and framework-specific configuration are covered in the getting started with TestMu automation documentation.
Katalon: If your user community for test automation is large, this is the preferred choice among the tools. It is an all-in-one platform. You need not have a complicated setup for this tool. It is a readymade framework that renders codeless and free solutions.
Watir: The complete name is web application testing in Ruby. The Ruby programming code is used to create this open-source library. Using this, you can write tests that can be easily read and maintained on a flexible, lightweight UI. Watir endorses disparate user interaction abilities for website testing, such as validating texts, entering data in forms, and clicking links.
Apache JMeter: This is open-source software for test automation. It can measure test performance and load functional test behaviors. It can render an entire Regression test suite for end users. It supports performance and load testing on disparate servers, applications, and protocols.
Ranorex Studio: This has an inbuilt Selenium WebDriver. It can be used for automated regression testing of mobile, web, and desktop apps. The studio is inclusive of complete IDE plus tools to perform codeless automation.
The regression testing techniques are re-test all, regression test selection, and test case prioritization, plus a hybrid combining selection with prioritization to balance coverage against runtime.
The following are techniques used in regression tests: Test case prioritization, Regression test selection, Re-test all, and Hybrid.

You have to re-execute all the test cases in the suite, ensuring the code alteration has not introduced any bugs.
Re-test all needs more time and resources than the other techniques, which makes it the most expensive.
However, it is the most secure method because it ensures that all the bugs have been identified and fixed. This method is generally applicable when there is a major update in the operating system, or the application is modified for a new language or platform.
Based on the code modification in the module, you can choose some test cases from the test suite. Then, you re-execute these selected test cases. The entire test suite need not be re-executed. The test cases are categorized into two types: obsolete test cases and reusable test cases.
In upcoming regression cycles, skip the obsolete test cases and execute the reusable ones.
You are implementing only the relevant cases, which are limited in number. That decreases the time and effort the regression pass costs.
Every test case is assigned a priority based on its criticality, its impact on the product, and how frequently the functionality is used.
Cases covering newly added functionality and customer-facing areas fall into the high-priority category.
High-priority cases execute first, medium-priority follow, and low-priority run last.
Prioritization pays off most when the suite is longer than the CI window.
Ordering by risk means the failures that would block a release surface in the first few minutes, not at the end of a two-hour run.
This technique is a blend of test case prioritization and regression test selection. The complete test suite is not re-executed. Based on priority, you have to select test cases for re-execution.
Retesting re-runs test cases that failed, confirming a specific bug is fixed, while regression testing re-runs cases that already passed, confirming the fix did not break anything else.
The short answer: retesting re-runs test cases that failed, confirming a specific bug is fixed.
Regression testing re-runs cases that passed, confirming the fix broke nothing else. Retesting is scoped to the defect; regression testing covers everything the changed code touches.
Here's a detailed comparison between retesting and regression testing:
| Retesting | Regression Testing |
|---|---|
| Ensures bug-free and flawless execution of test cases after fixing bugs. | Ensures code functionality remains unaffected after adjusting or modifying the application. |
| Performed for failed test cases. | Performed for passed test cases. |
| Fixes the original bug in the build. | Tests for unintended changes or outcomes in the code. |
| Automated retesting is not possible. | automated regression testing is possible. |
| Also known as planned testing. | Also known as generic testing. |
| Usually cannot be performed in parallel with regression testing due to high priority. | It can be performed in parallel with retesting in some cases, based on lower priority and resource availability. |
| Doesn't include bug verification as a part of testing. | Includes bug verification as a part of testing |
| Performed across all software releases. | Performed across a few latest versions of the software. |
| Less time-consuming. | More time-consuming as it involves a detailed analysis of previous software versions' issues. |
Define a regression test case by covering frequently failing defects, recently fixed areas, priority one and two paths, core features, integration points, and every module the code change touched.
Ensuring the smooth release of software involves selecting the correct test cases while performing regression testing. New bugs can even arise after making changes or fixing the code. Hence, performing regression testing with the correct test cases is crucial before launching the product.
Given below are some types of test cases that you should include in your regression test suite:
By including the above-suggested test cases, developers can improve their chances of finding bugs early on and ensure a smooth release of their product.
The types of regression testing are complete, partial, unit, corrective, selective, and re-test regression, each scoped to how widely a given code change reaches across the application's modules.
You can implement various regression tests depending on the feature or update you aim to deploy. However, it is crucial to understand the several regression test types to choose the right one.
Regression testing is of the following types.
Opt for this type when code changes across many modules and the impact on other modules is unknown.
The decision then is to check the entire product, detecting any further modifications originating from the changed code.
For a second product release, a client may request four or five new features plus fixes for defects from the first release.
The testing team runs impact analysis and concludes the entire product needs testing. In short, this type means testing all altered and old features.
Let us consider a Java application with Java Virtual Machine (JVM) as the root file. The Java application must be tested if a change is essential for the JVM file.
After developers make some code changes, the unit of this changed code is integrated with the existing (that is, unchanged) code. You have to verify whether the changed code works as per expectations.
You have to do this while the unit testing phase is in progress, with the code of a unit tested in isolation.
The goal is testing the unit at an individual level, so all dependencies on the unit under test are blocked.
Corrective regression is one of the simpler tests and requires less effort.
It involves zero changes to the existing codebase while new functionality is added. You test existing functionality with its current cases rather than developing new ones.
Selective Regression test determines the impact of the existing codebase and both new and existing code. Common elements like variables and functions are implemented into the application to identify results without affecting the entire process.
Re-test regression involves re-executing all the test cases to ensure no defects due to code alterations in the software. This type of testing needs more manual effort from the QA side.
Note: Types and techniques are different axes. A type describes how much of the product you retest; a technique describes how you choose which cases actually run.
AI changes regression testing through predictive test selection, self-healing locators, flaky-test detection, and natural-language authoring, all aimed at cutting suite runtime and maintenance cost.
The oldest problem in regression testing is that the suite only ever grows. Every release adds cases, and every case runs on every build afterwards.
Beyond a certain size, running everything stops being affordable, and selecting correctly becomes the whole game.
Machine learning is now used to make that selection.
Rather than mapping code to tests by hand, a model trains on historical build data to predict which tests are likely to fail for a change.
The published results are strong. In Predictive Test Selection, Machalica et al. report that a machine-learned model cut total testing infrastructure cost by half.
It still reported over 95% of individual test failures and over 99.9% of faulty changes back to developers.
Google reached a similar conclusion from the opposite direction.
Their analysis in Taming Google-Scale Continuous Testing found that very few tests ever fail, and that code recently modified by more than three developers breaks more often.
That second finding is the practical one. Ownership churn is a usable risk signal, and you do not need a trained model to act on it.
Prioritizing tests that cover files with many recent contributors is something a team can do this sprint.
One caution worth stating plainly: predictive selection trades completeness for speed. A model that skips 60% of your suite will eventually skip the test that mattered.
Most teams run selection on pull requests and a full pass nightly, so the safety net still exists.
Our guide to AI in regression testing covers how these pieces fit together in a working pipeline.
In CI/CD, regression testing runs as staged gates: unit tests pre-commit, a prioritized subset on pull requests, the full suite post-merge, and the browser matrix nightly, each with its own budget.
In a CI/CD pipeline, regression testing is not one event. It is a set of gates, each with a different budget and a different tolerance for missing something.
| Stage | What runs | Target runtime | On failure |
|---|---|---|---|
| Pre-commit | Unit tests for the changed module | Under 2 minutes | Blocks the commit |
| Pull request | P1 regression group, selected by impact analysis | Under 10 minutes | Blocks the merge |
| Post-merge | Full regression suite, run in parallel | Under 30 minutes | Blocks the release candidate |
| Nightly | Full suite plus cross-browser and cross-device matrix | Hours, off the critical path | Raises a triage ticket |
| Pre-release | Full suite plus manual exploratory around changed areas | Scheduled | Blocks the release |
The runtimes matter more than the stage names. Once a pull request gate exceeds roughly ten minutes, developers start context-switching away, and the feedback loop that justified the suite stops working.
Two levers keep those numbers in range. Selection reduces how many tests run, and parallel execution reduces how long a given set takes.
Selection alone eventually hits its accuracy limit, so most teams need both.
The main regression testing challenges are suite cost and runtime, rising case complexity, ongoing maintenance, flaky tests destroying trust in results, and knowing which tests a change requires.
Regression tests help unearth bugs while introducing new features or in an existing codebase and mitigate app failures and performance bottlenecks.
However, while running a regression test, the following are a few challenges testers face.
Test suite cost and time: A regression test suite needs continuous improvement when deploying new features. The number of test cases keeps growing, and new tests must run alongside older ones on every build.
Incorporating parallel testing is the usual fix, running test cases concurrently across multiple browsers and OS combinations so that suite growth costs money rather than wall-clock time.
Complex test cases: As the software project becomes more intricate, the number of test cases and their complexity also rise, consuming a lot of time and resources.
Maintenance: As the application size grows, the complexity of test cases in regression test suites increases. Therefore, proper maintenance is crucial to tackling the complexity and test execution time.
Flaky tests: a test that passes and fails on the same code destroys the signal the suite exists to provide.
Once a team learns to re-run red builds instead of investigating them, genuine regressions start slipping through.
Quarantine flaky cases into a separate group rather than deleting them, then fix them on a schedule. A regression suite that developers do not trust is worse than a smaller one they do.
Knowing what to run: Without impact analysis, the only safe choice is to run everything, which is exactly the option teams cannot afford. Weak dependency mapping is what forces the brute-force approach.
Most regression suites do not fail because the tests were written badly. They fail because nobody decided what the suite was allowed to cost. These practices are ordered by how much they change that.
The number of test cases will grow as your application becomes more complex, so the infrastructure needs to scale with the suite rather than cap it.
Subscribe to our TestMu AI YouTube Channel to get the latest updates on tutorials around Selenium automation, Cypress testing, and more.
Regression testing is the check that keeps working software working. Everything else in this guide, the types, the techniques, the tooling, exists to answer one question: after this change, what else might have broken?
The teams that do it well are not the ones with the largest suites.
They are the ones who decided what the suite costs, tagged cases so selection is possible, quarantined flaky tests, and kept a full pass off the critical path.
Start smaller than feels safe.
A prioritized set covering the paths that generate revenue, running on every pull request in under ten minutes, catches more real regressions than a suite everybody skips.
From there, grow coverage and add environments. Selection keeps the run list short, and parallel execution keeps the clock flat, which is what lets the suite expand without the pipeline slowing down.
Author
Irshad Ahamed is a Technical Writer and Information Architect with over 4 years of experience working across notable companies like Amazon, IBM, and Symantec. He specializes in crafting high-quality documentation, technical writing, and content strategies for software development, APIs, and process documentation. Irshad’s expertise spans across product documentation, creating instructional content, and collaborating with cross-functional teams to ensure clear, concise, and easily understandable outputs. His certifications include PMI-ACP and Camtasia 2019 Essentials.
Reviewer
Himanshu Sheth is the Director of Marketing (Technical Content) at TestMu AI, with over 8 years of hands-on experience in Selenium, Cypress, and other test automation frameworks. He has authored more than 130 technical blogs for TestMu AI, covering software testing, automation strategy, and CI/CD. At TestMu AI, he leads the technical content efforts across blogs, YouTube, and social media, while closely collaborating with contributors to enhance content quality and product feedback loops. He has done his graduation with a B.E. in Computer Engineering from Mumbai University. Before TestMu AI, Himanshu led engineering teams in embedded software domains at companies like Samsung Research, Motorola, and NXP Semiconductors. He is a core member of DZone and has been a speaker at several unconferences focused on technical writing and software quality.
Did you find this page helpful?
More Related Blogs
TestMu AI forEnterprise
Get access to solutions built on Enterprise
grade security, privacy, & compliance