'''Regression testing''' (rarely, ''non-regression testing''<ref>{{cite book |last1=Pezzè |first1=Mauro |last2=Young |first2=Michal |title=Software testing and analysis: process, principles, and techniques |date=2008 |publisher=Wiley |url=https://www.google.com/search?q=Mauro+%22non-regression%22+%22regression+testing%22 |quote=Testing activities that focus on regression problems are called (non) regression testing. Usually "non" is omitted}}</ref>) is re-running [[functional testing|functional]] and [[non-functional testing|non-functional tests]] to ensure that previously developed and tested software still performs as expected after a change.<ref>{{cite book|last=Basu|first=Anirban| title=Software Quality Assurance, Testing and Metrics| year=2015| publisher=PHI Learning| isbn=978-81-203-5068-7| url=https://books.google.com/books?id=aNTiCQAAQBAJ&pg=PA150}}</ref> If not, that would be called a ''[[software regression|regression]]''.
Changes that may require regression testing include [[software bug|bug]] fixes, software enhancements, [[configuration file|configuration]] changes, and even substitution of [[electronic component]]s ([[Computer hardware|hardware]]).<ref>[[National Academies of Sciences, Engineering, and Medicine|National Research Council]] Committee on Aging Avionics in Military Aircraft: [https://www.nap.edu/catalog/10108/aging-avionics-in-military-aircraft ''Aging Avionics in Military Aircraft'']. The National Academies Press, 2001, page 2: ″Each technology-refresh cycle requires regression testing.″</ref> As regression [[test suite]]s tend to grow with each found defect, test automation is frequently involved. The evident exception is the [[Graphical user interface|GUIs]] regression testing, which normally must be executed manually. Sometimes a [[change impact analysis]] is performed to determine an appropriate subset of tests (''non-regression analysis''<ref>{{cite book |last1=Boulanger |first1=Jean-Louis |title=CENELEC 50128 and IEC 62279 Standards |date=2015 |publisher=Wiley |isbn=978-1119122487 |url=https://books.google.com/books?id=IbZNCAAAQBAJ&pg=PA149}}</ref>).
==Background==
Sometimes re-emergence occurs because a fix gets lost through poor [[revision control]] practices (or simple [[human error]] in revision control). Often, a fix for a problem will be "[[software brittleness|fragile]]" in that it fixes the problem in the narrow case where it was first observed but not in more general cases which may arise over the lifetime of the software. Frequently, a fix for a problem in one area inadvertently causes a [[software bug]] in another area.
Finally, itIt may happen that, when somea feature is redesigned, some of the same mistakes that were made in the original implementation of the feature arealso madeoccur in the redesign. Therefore, inIn most software development situations, it is considered [[Best Coding Practices|good coding practice]], when a bug is located and fixed, to record a test that exposes the bug and re-run that test regularly after subsequent changes to the program.<ref name="kolawa">{{cite book | last = Kolawa | first = Adam | author2 = Huizinga, Dorota | title = Automated Defect Prevention: Best Practices in Software Management | url = http://www.wiley.com/WileyCDA/WileyTitle/productCd-0470042125.html | year = 2007 | publisher = Wiley-IEEE Computer Society Press | page = 73 | isbn = 978-0-470-04212-0 | archive-date = 2012-04-25 | access-date = 2010-07-20 | archive-url = https://web.archive.org/web/20120425232401/http://www.wiley.com/WileyCDA/WileyTitle/productCd-0470042125.html | url-status = dead }}</ref>
Although this may be done through [[manual testing]] procedures using programming techniques, it is often done using [[automated testing]] tools.<ref>[http://safari.oreilly.com/0201794292/ch08lev1sec4 Automate Regression Tests When Feasible], Automated Testing: Selected Best Practices, Elfriede Dustin, Safari Books Online</ref> Such a [[test suite]] contains software tools that allow the testing environment to execute all the regression [[Test case (software)|test case]]s automatically; somemany projects evenhave setautomated up[[Continuous automatedintegration]] systems to re-run all regression tests at specified intervals and report any failures (which could imply a regression or an out-of-date test).<ref>{{cite web| url=http://www.drdobbs.com/tools/change-code-without-fear/206105233| title=Change Code Without Fear: Utilize a Regression Safety Net|last=daVeiga|first=Nada|work=[[Dr. Dobb's Journal]]| date=2008-02-06}}</ref>
Common strategies are to run such a system after every successful compile (for small projects), every night, or once a week. Those strategies can be automated by an external tool.
=== Retest all ===
This technique checks all the test cases on the current program to check its integrity and validate the adverse impact of bug resolving process on another sections. Though it is expensive as it needs to re-run all the cases, it ensures that there are no errors because of the modified code.<ref name=":0">{{Cite conference|date=2008-03-29|title=Understanding Regression Testing Techniques|first1=Gaurav|last1=Duggal|first2=Bharti|last2=Suri|conference=National Conference on Challenges and Opportunities|___location=Mandi Gobindgarh, Punjab, India|citeseerx=10.1.1.460.5875}}</ref>
=== Regression test selection ===
{{Quotation |text=Also as a consequence of the introduction of new bugs, program maintenance requires far more system testing per statement written than any other programming. Theoretically, after each fix, one must run the entire batch of test cases previously run against the system to ensure that it has not been damaged in an obscure way. In practice, such ''regression testing'' must indeed approximate this theoretical idea, and it is very costly.|author=[[Fred Brooks]]|title=''[[The Mythical Man Month]]''|source=p. 122}}
Regression tests can be broadlydone categorizedat asany level, from [[functionalunit testtesting|unit]]s orthrough to [[UnitSystem integration testing|unitsystem testsintegration]]. Functional tests exercise the complete program with various inputs. UnitThese tests exerciseare individualoften functions,automated [[subroutine]]s,due orto objectthe methods.need Bothfor functional testing toolsrepetition, and unit-testing tools tend tomay be automateddone andby aretest often third-party productstools that are not part of the compiler suite. A functional test may be a scripted series of program inputs, possibly even involving an automated mechanism for controlling mouse movements and clicks. A unit test may be a set of separate functions within the code itself or a driver layer that links to the code without altering the code being tested.
== The role of AI in Regression Testing ==
Regression testing is a crucial phase in software development, ensuring that new code changes do not negatively impact existing functionalities. Over time, the role of Artificial Intelligence (AI) in regression testing has significantly evolved, offering several advantages to streamline and enhance the testing process.<ref>{{Cite web |date=2023-09-01 |title=MuukTest's AI-Powered Test Automation Platform Releases New Features |url=https://muuktest.com/blog/muuktests-ai-powered-test-automation-platform-has-new-features/ |access-date=2023-10-06 |language=en-US}}</ref> This section discusses the key contributions of AI in the context of regression testing.
=== Automated Test Creation ===
One of the primary roles of AI in regression testing tools is the ability to autonomously generate and automate test cases. AI algorithms can analyze the software's codebase and identify potential areas where regression tests should be conducted. This automation significantly reduces the manual effort required for test case creation, making the testing process more efficient.
=== Test Maintenance ===
AI-powered regression testing tools are equipped with capabilities to efficiently manage and update test suites. These tools can detect changes in the application's codebase and automatically adjust test cases accordingly, reducing the need for extensive manual test maintenance. This leads to a more agile and responsive testing process.
=== Enhanced Test Coverage ===
AI-driven regression testing tools can identify and prioritize test scenarios based on historical data and code changes. This ensures that critical test cases are executed more frequently, thereby enhancing test coverage and increasing the chances of identifying regressions early in the development cycle.
=== Efficient Bug Detection ===
AI algorithms can be trained to identify patterns associated with common regression issues. This enables these tools to detect potential regressions more effectively and with greater accuracy. AI can also perform exploratory testing, helping testers uncover hidden bugs and improve overall software quality.
=== Automated Reporting ===
AI can automate the generation of detailed test reports. These reports provide actionable insights into the state of the software, including information on test results, code changes, and potential regressions. Automated reporting saves time for quality assurance teams and allows them to focus on analyzing results rather than report generation.
=== AI Oversight ===
In regression testing, AI can work in conjunction with human testers. QA experts can monitor the performance of AI algorithms, provide evaluations, and offer feedback for continuous improvement. This collaborative approach ensures that AI adapts to evolving testing needs.
=== Product-Centric Approach ===
AI-powered regression testing tools enable development teams to concentrate on product development rather than managing testing frameworks, libraries, and scripts. This shift towards a product-centric approach enhances the overall efficiency of the software development process.
Incorporating AI into regression testing tools has revolutionized the way software testing is conducted. It has led to faster, more reliable, and cost-effective testing processes, ultimately contributing to higher software quality. As technology continues to advance, the role of AI in regression testing tools is expected to evolve further, offering even more sophisticated capabilities for ensuring software reliability and stability.
==See also==
*[[Quality control]]
*[[Test-driven development]]
==References==
{{reflist}}
==External links==
* [https://learn.microsoft.com/en-us/azure/load-testing/tutorial-identify-performance-regression-with-cicd?tabs=pipelines Microsoft regression testing recommendations]
{{Software testing}}
|