Regression testing: Difference between revisions

Content deleted Content added
Connordor (talk | contribs)
mNo edit summary
m added paragraph breaks
Line 2:
{{Short description|Checking whether changes to software have broken functionality that used to work}}
{{Software development process}}
'''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 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.<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 suites tend to grow with each found defect, test automation is frequently involved. 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==
As software is updated or changed, or reused on a modified target, emergence of new faults and/or re-emergence of old faults is quite common.
As software is updated or changed, or reused on a modified target, emergence of new faults and/or re-emergence of old faults is quite common. 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, it may happen that, when some feature is redesigned, some of the same mistakes that were made in the original implementation of the feature are made in the redesign. Therefore, in 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 }}</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]]s automatically; some projects even set up automated 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.
 
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, it may happen that, when some feature is redesigned, some of the same mistakes that were made in the original implementation of the feature are made in the redesign. Therefore, in 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 }}</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]]s automatically; some projects even set up automated 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.
 
Regression testing is an integral part of the [[extreme programming]] software development method. In this method, design documents are replaced by extensive, repeatable, and automated testing of the entire software package throughout each stage of the [[software development process]]. Regression testing is done after functional testing has concluded, to verify that the other functionalities are working.