regression testing

A component of the software lifecycle
Collection
zero Useful+1
zero
Regression testing refers to re testing after modifying the old code to confirm that the modification does not introduce new errors or lead to other code An error occurred. Automatic regression testing will be greatly reduced System test , maintenance and upgrading.
Regression testing as Software life cycle A component of software test It accounts for a large proportion of workload in the process, software development Multiple regression tests will be conducted at each stage of. In progressive and rapid iterative development, the continuous release of new versions makes regression testing more frequent Extreme programming In the method, it requires several regression tests every day. Therefore, it is meaningful to improve the efficiency and effectiveness of regression testing by selecting the correct regression testing strategy.
Chinese name
regression testing
Foreign name
Regression Testing
Nature
concept
Type
test
Purpose
Test programming
Regression testing is a very important and expensive process in software testing. How to reduce the cost of regression testing and improve regression testing
The research on trial efficiency will be of great significance. Regression test selection technology has become a hot research topic in the world.

Cause

Announce
edit
At any stage of the software life cycle, as long as the software changes, it may bring problems to the software. The change of software may be due to the discovery of errors and modifications, or it may be due to the addition of new modules in the integration or maintenance phase. When errors contained in the software are found, if the error tracking and management system is not perfect, the modification of these errors may be missed; However, developers do not have a thorough understanding of errors, which may lead to changes that only correct the external manifestations of errors, but not the errors themselves, resulting in modification failure; Modification may also cause side effects, which may lead to new problems in the unmodified part of the software, and errors in functions that originally worked normally. Similarly, when new code is added to the software, the new code may have an impact on the original code in addition to errors. Therefore, whenever the software changes, we must retest the existing functions to determine whether the modification has achieved the intended purpose and whether the modification has damaged the original normal functions. At the same time, new test cases need to be added to test new or modified functions. In order to verify the correctness of the modification and its impact, regression testing is required.
As a part of the software life cycle, regression testing takes a large proportion of the workload in the whole software testing process, and multiple regression tests will be carried out in each stage of software development. In progressive and rapid iterative development, the continuous release of new versions makes regression testing more frequent. In extreme programming methods, regression testing is required several times a day. Therefore, it is very meaningful to improve the efficiency and effectiveness of regression testing by selecting the correct regression testing strategy. [1]

definition

Announce
edit
1. Regression test means to repeat all or part of the previous same test.
2. The newly added modules may have side effects on other modules, so some regression tests must be carried out.
3. The focus of regression test is the key module.

test case

Announce
edit
For a Software development project For example, the test team of the project will integrate the developed test case Save to the "Test Case Library", and maintain and manage it. When you get a software baseline In version, all test cases used for baseline version testing form a baseline test case library. When regression testing is needed, appropriate test cases can be extracted from the baseline test case library to form a regression test package according to the selected regression testing strategy, and regression testing can be realized by running the regression test package. Test cases saved in the baseline test case library may be automatic Test script , or it may be the manual implementation process of test cases.
Regression testing requires time, funds and manpower to plan, implement and manage. In order to conduct regression testing as efficiently and effectively as possible under a given budget and schedule, it is necessary to test case The database is maintained and the corresponding regression test package is selected according to certain strategies.
Maintenance of test case library
In order to meet the needs of customers and meet the requirements of applications to the greatest extent, software will be frequently modified and new versions will be introduced continuously in its life cycle. The modified or new version of software will add some new functions or make some changes in software functions. With the change of software, the functions and application interfaces of the software and the implementation of the software have evolved. Some test cases in the test case library may lose their pertinence and effectiveness, while others may become outdated, and some test cases will not work at all. In order to ensure the effectiveness of test cases in the test case library, the test case library must be maintained. At the same time, the modified or newly added software functions cannot reveal the problems just by rerunning the previous test cases. It is necessary to add new test cases to test these new functions or features. Therefore, test case The maintenance of the library should also include the development of new test cases, which are used to test new features of the software or cover software functions or features that cannot be covered by existing test cases.
The maintenance of test cases is an uninterrupted process, and software development baseline As a benchmark, the main contents of maintenance include the following aspects.
(1) Delete obsolete test cases Because of changes in requirements and other reasons, a baseline test case may not be suitable for the system under test, and these test cases will become obsolete. For example, if the boundary of a variable changes, the original test for the boundary value cannot complete the test for the new boundary. Therefore, the corresponding obsolete test cases should be deleted after each modification of the software.
(2) , Uncontrolled improvement test case
With the development of software projects, the number of test cases in the test case library will continue to increase, and some test cases that are very sensitive to input or running status will appear. These tests are not easy to repeat and the results are difficult to control, which will affect the efficiency of regression tests and need to be improved to make them repeatable and controllable.
(3) , Delete redundancy Test case for
If there are two or more test cases for testing the same set of inputs and outputs, these test cases are redundant. The existence of redundant test cases reduces the efficiency of regression testing. Therefore, it is necessary to regularly sort out the test case library and delete redundant use cases.
(4) Add new test cases
If a Program segment , components or key interfaces have not been tested in the existing tests, then new ones should be developed test case Retest it. And merge the newly developed test cases into baseline Test package.
The maintenance of test case library not only improves the usability of test cases, but also improves the credibility of the test library. At the same time, it can maintain the efficiency and utility of a baseline test case library at a higher level.
Selection of regression test package
stay Software life cycle Even a well maintained test case library may become quite large, which makes it impractical to rerun a complete test package for each regression test. A complete regression test includes each baseline test case. Time and cost constraints may prevent running such a test. Sometimes the test team has to choose a reduced regression test package to complete the regression test.
The value of regression testing is that it is a controlled experiment that can detect regression errors. When the test group selects the reduced regression test, it is possible to delete the test case , eliminating the opportunity to find regression errors. However, if secure reduction techniques such as code dependency analysis are used, it can be determined which test cases can be deleted without destroying the intent of regression testing. [1]

regression testing

Announce
edit
The choice of regression testing strategy should consider both efficiency and effectiveness. Common ways to select regression tests include:
(1) Re test all cases
choice baseline All test cases in the test case library form a regression test package, which is a relatively safe method. Retesting all test cases has the lowest risk of missing regression errors, but the test cost is the highest. All retests can be applied to almost any situation, and there is basically no need for analysis and redevelopment. However, with the development progress, test case Increasing, repeating all the previous tests will bring a lot of work, which often exceeds our budget and schedule.
(2) Risk based selection test
Based on certain risk criteria baseline Select regression test package in test case library. Run the most important, critical and suspicious tests first, and skip the non critical, low priority or highly stable test cases. Even though these test cases may test defects, the severity of these defects is only three or four levels. In general, the test ranges from primary to secondary characteristics.
(3) . Select test based on operation profile
If Baseline test case The test cases of the library are developed based on the software operation profile, and the distribution of test cases reflects the actual use of the system. The number of test cases used in regression testing can be determined by the test budget. Regression testing can give priority to those test cases that target the most important or frequently used functions, release and mitigate the highest level of risk, and help to find those faults that have the greatest impact on reliability as soon as possible. This method can most effectively improve the system reliability under a given budget, but it is difficult to implement.
(4) Retest the modified part
When testers have enough confidence in the localization of modifications, they can identify software modifications through dependency analysis and analyze the impact of modifications, limiting regression testing to the changed module and its interface. Usually, a regression error must involve a new, modified or deleted Code snippet If allowed, the regression test should cover the affected part as much as possible.
The strategy of retesting all use cases is the safest strategy, but regression tests that have been run many times are unlikely to reveal new errors, and in many cases, due to time, personnel, equipment and funding reasons, it is not allowed to choose the regression test strategy of retesting all use cases. At this time, you can choose an appropriate strategy for reduced regression tests. [1]

Test process

Announce
edit
Yes test case The following basic processes can be followed for regression testing:
(1). Identify the modified part of the software;
(2). From the original baseline In the test case library T, exclude all test cases that are no longer applicable, and determine those test cases that are still valid for the new software version. The result is to establish a new baseline test case library T0.
(3). Select test cases from T0 according to certain strategies to test the modified software.
(4). If necessary, generate a new test case set T1 to test the software parts that T0 cannot fully test.
(5). Execute the modified software with T1.
Steps (2) and (3) test to verify whether the modification destroys the existing function, and steps (4) and (5) test to verify the modification itself.

Test Practice

Announce
edit
In practical work, regression tests need to be repeated. When testers complete the same tests again and again, these regression tests will become very boring, especially when most regression tests need to be completed manually. Therefore, they need to pass automatic testing To achieve repeated and consistent regression testing. The efficiency of regression testing can be improved through test automation. In order to support multiple regression testing strategies, automated testing tools should be universal and flexible, so as to meet the requirements of achieving different regression testing goals.
When testing software, it is common to apply a variety of testing techniques. When testing a modified software, the tester may also want to use more than one regression testing strategy to increase confidence in the modified software. Different testers may choose different regression testing techniques and strategies based on their own experience and judgment.
Regression testing does not reduce the testing requirements for new functions and features of the system, and the regression test package should include the testing of new functions and features. If the regression test package cannot meet the required coverage requirements, new test case Make the coverage meet the specified requirements.
Regression testing is an activity with more repetitions, which is easy to make testers feel tired and tired and reduce testing efficiency. In practical work, some strategies can be used to alleviate these problems. For example, assign new testers to complete manual regression testing, assign more experienced testers to develop new test cases, and write and debug automatic Test script , do some exploratory or ad hoc tests. It can also encourage testers to execute test cases creatively without affecting the test objectives. The changed input, keys and configurations can help motivate testers and reveal new errors.
There are two points to pay attention to when organizing regression testing. First, the modification in each test phase must be completed in this test phase to avoid leaving errors to the next test phase. Secondly, the software version should be frozen during the regression test, and the problems found in the regression test should be centrally modified and regressed.
In practical work, regression testing can be combined with compatibility testing. Running the old test under the new configuration condition can find compatibility problems, and can also reveal coding errors in regression.