Definition of regression test:
Regression testing refers to re-testing the old code after it has been modified to confirm that the modification did not introduce a new error or cause other code to produce an error.
1. Regression testing refers to repeating all or part of the same test in the past. 2. New modules that are added to the test may have side effects on other modules, so some degree of regression testing is required. 3. The center of gravity of the regression test is the key module.
Benefits of regression testing:
Automated regression testing significantly reduces the cost of system testing, maintenance upgrades, and more. As an integral part of software life cycle, regression testing occupies a great proportion of workload during the whole software testing process, and many regression tests are carried out at every stage of software development.
The existence meaning of regression test:
In progressive and fast iterative development, successive releases of new versions make regression testing more frequent, and in extreme programming methods, it is required that several regression tests are performed every day. Therefore, it is very meaningful to improve the efficiency and effectiveness of regression testing by choosing the right regression test strategy.
Requirements for regression testing:
For a software development project, the Test team of the project will save the test case to the test case library and maintain and manage it in the process of implementing the test. When a baseline version of a software is obtained, all test cases for baseline version testing form the baseline test case library. When regression testing is required, it is possible to extract the appropriate test cases from the baseline test case library to form a regression test package according to the selected regression test strategy, and to implement regression testing by running the regression test package. The test cases saved in the baseline test case library may be automated test scripts, or they may be manual implementations of test cases.
Selection of test cases:
For a software development project, the Test team of the project will save the test case to the test case library and maintain and manage it in the process of implementing the test. When a baseline version of a software is obtained, all test cases for baseline version testing form the baseline test case library. When regression testing is required, it is possible to extract the appropriate test cases from the baseline test case library to form a regression test package according to the selected regression test strategy, and to implement regression testing by running the regression test package. The test cases saved in the baseline test case library may be automated test scripts, or they may be manual implementations of test cases.
The maintenance of test cases is an uninterrupted process, usually the baseline of software development can be used as a benchmark, the main content of maintenance includes the following aspects.
(1), delete outdated test cases because of changes in requirements, and so on, may make a baseline test case no longer suitable for the test system, these test cases will become obsolete. For example, the bounds of a variable have changed, and the original test against the boundary value cannot complete the new boundary test. Therefore, the corresponding obsolete test cases should be deleted after each modification of the software.
(2), improve the uncontrolled test cases
As the software project progresses, the use cases in the test case library are increasing, with some test cases that are sensitive to the input or run state. These tests are not easy to repeat and the results are difficult to control, affecting the efficiency of the regression test, need to be improved to achieve repeatable and controllable requirements.
(3), delete redundant test cases
These test cases are redundant if there are two or more test cases that are tested against a set of identical inputs and outputs. The existence of redundant test cases reduces the efficiency of regression testing. Therefore, the test case library needs to be regularly collated and redundant use cases removed.
(4), add new test Cases
If a program segment, component, or critical interface is not tested in an existing test, then a new test case should be developed to test it again. And merge the newly developed test cases into the baseline test package.
The maintenance of the test case library not only improves the usability of the test case, but also improves the credibility of the test library, while maintaining the efficiency and utility of a baseline test case library at a higher level.
The choice of regression testing should take into account both efficiency and effectiveness in two areas. Common ways to choose regression tests include:
(1), re-test all use cases
Selecting all of the test cases in the baseline test case library constitutes a regression test package, which is a safe way to test all use cases with the lowest risk of missing regression errors, but with the highest testing costs. All re-testing can be applied to almost any situation, and there is basically no need for analysis and redevelopment, but as development progresses, the number of test cases continues to increase, and the repetition of all the previous tests will bring a lot of work, often beyond our budget and schedule.
(2), risk-based selection testing
Regression test packages can be selected from the baseline test case library based on a certain risk criteria. Run the most important, critical, and questionable tests first, and skip those non-critical, low-priority, or high-stability test cases that can have a severity of three or four even if they are likely to be tested for defects. In general, tests are from primary characteristics to secondary characteristics.
(3), based on the Operation Profile selection test
If the test case of the baseline test case library is developed based on the software operation profile, the distribution of the test cases reflects the actual usage of the system. The number of test cases used by regression tests can be determined by the test budget, and regression testing prioritizes those test cases that target the most important or most frequently used features, releasing and mitigating the highest level of risk, and helping to identify those failures that have the greatest impact on reliability as early as possible. This method can improve the reliability of the system under a given budget, but it is difficult to implement.
(4), re-test the modified part
When the tester has sufficient confidence in the localization of the modification, it can identify the software modification by the dependency analysis and analyze the influence of the modification, and confine the regression test to the changed module and its interface. In general, a regression error must involve a new, modified, or deleted code snippet. Under permissible conditions, the regression test covers as much of the affected parts as possible.
The basic process of regression testing:
(1). Identify the part of the software that has been modified;
(2). From the original baseline test Case Library T, exclude all test cases that are no longer applicable and determine which test cases are still valid for the new version of the software, and the result is a new baseline test case Library T0.
(3). Select a test case from T0 to test the modified software from a certain strategy.
(4). If necessary, generate a new set of test cases, T1, to test the parts of the software that T0 cannot adequately test.
(5). Execute the modified software with T1.
On regression test of software testing