Regression testing is usually required to ensure http://www.aliyun.com/zixun/aggregation/8904.html "> software quality." However, it is widely regarded as an expensive process. To reduce this cost, test selection techniques are applied to the entire test suite.
The result of adopting a Test selection technique is to reduce the test suite. Several existing Test selection techniques try to reduce the size of test suites while maintaining high defect detection rates.
This paper introduces a safe and efficient Test selection technology, which relies on profiling information to select test cases. We call this technology profiling directional selection (profile-directed selection, PDS).
The PDS runs in two phases:
Populating the database with profiling information The first phase associates the application source code with the test case. It executes a complete test suite on the code coverage or profiling instrumentation application. The profiling information generated is a directory for the source files, function names, and line statements that each test case invokes. Each test case is then associated with the application files and functions it encounters. Save this relationship in the relational database. Code coverage data can be applied together with finer granularity, but doing so can have a cost: more data means more processing time and maintenance time.
Selecting a test case based on a change set the second phase (Test selection phase) builds and executes a query based on the source code modifications made to the application. The query selects some test cases that traverse the function that the code changes to modify.
Figure 1. Test selection in regression testing
Analyzer detection
The PDS relies on profiling information to correlate test cases with the source code of the application. Therefore, the application must be instrumented to generate profiling information. When you select a parser, you need to consider the following:
Output availability storage requirements for relative performance impact tools
In our experiment, we chose to use function hooks through the functrace feature of the IBM XL c++/c++ and the Fortran compiler. We use this compiler feature to place Func_trace_enter and func_trace_exit hooks on each function of the sample application. These functions generate profiling information.
The PDS uses relational databases to associate each function and source file with each test case. We used IBM db2® in our experiment.
PDS is a kind of function-level granularity selection technology. Code coverage granularity can be fine-grained or coarse-grained, as needed. We chose the function level granularity because it represents the intermediate value between the selection of the technical processing cost and the reduction of the test suite size. Finer-grained test-selection techniques, such as those based on control flow diagrams, may choose fewer test cases, but they require more processing time and higher storage requirements. For applications consisting of thousands of test cases, processing costs may outweigh the benefits of the method, so granularity should be considered.
function Change Set detection
The modification of the source file between S and S is called the changeset. In our experiment, it is a manual step to extract the modified function and the modified source file in the change set.
Most integrated development environment (IDE) applications can automatically detect changes between S and S '.
Effectiveness of modeling selection methods
Analysis of the effectiveness of directional selection techniques based on defect detection effectiveness and average test suite drop rate.