Lecture - 11 - Regression Testing
Lecture - 11 - Regression Testing
Spring 2024
Course Instructor:
Ms. Seemab Khan- Lecturer (Software Engineering )
Department of Creative Technologies
Air University - Islamabad
[email protected]
Lecture 11
REGRESSION
TESTING
Regression Testing
What is Regression Testing ?
● Testing done to verify that
– Code changes in software do not impact existing
functionality
– Goal is to make sure that product works fine as
previously
● with the newly added functionality
● or any change in the existing feature
● or once the bug fix is done
– Previously executed test cases are re-executed in
order to verify the impact of change.
When to perform Regression Testing ?
● Often for defect fixes when unsure whether defect is really fixed
● Develop new tests
– Probe around defect fix
– Test affected functionality
● Comes in retest all, and selective regression testing flavors
Regression testing process
● Identify changes
● Determine which tests will remain valid: T’
● Test modified software with T’
● If T’ does not meet test criterion, generate new test cases T’’
● Execute modified software with T ’’
Regression testing process (2)
● T’:
– test whether modifications have broken anything
– Determined either by retest all, or selective strategy
● T’’:
– test whether modified code works
● Use scope appropriate criteria
Classification of tests in T
● Reusable:
– does not test software modification
– Should produce same result
– Need not be rerun
● Retestable:
– Tests software modification
– Must be rerun
● Obsolete: no longer applies
Regression Testing
Approaches
● Full new test cycle
– Redesign entire test plan
– Rebuild whole test suite
● • Minimum regression test
– Reuse test plan as much as possible
– Rerun minimum number of retestable test cases
– Generate minimum number of new test cases for
changes
Approaches
● Expanded scope of regression testing
– Reuse part of test plan
– Rerun all retestable test cases
– Generate new test cases on the full scope of
changes
● Full reuse of existing test suite
● Reuse test plan and test suite
Practical regression testing
Attributes of regression tests
● Safe:
– All tests that could possibly exhibit different outputs on
the modified software
– Is 100% inclusive
● Precision:
– Percentage of tests in a reduced test suite that cannot
reveal regression faults, and
– Are not selected for the reduced test suite
Attributes of regression tests
● Efficiency:
● cost of identifying a reduced regression test suite
● Generality:
● range of application for the selection strategy
Regression test patterns
● Classification of techniques
– Mining and Machine learning approaches
– Model Based Testing
– Program Slicing
– Control Flow Graphs
– FireWall
Practice Task