When a large number of target paths in a sequential program need to be covered, we can divide similar target paths into the same group, and generate a test suite covering the same group of target paths at the same tim...
详细信息
When a large number of target paths in a sequential program need to be covered, we can divide similar target paths into the same group, and generate a test suite covering the same group of target paths at the same time, so as to reduce the testing cost. However, different communication edges may be run under a same test input when executing a Message-Passing Interface (MPI) program with non-determinism, which cause different code fragments may be traversed, indicating the difficulty of generating a test suite to cover each group of target paths. This paper proposes an approach to evolutionary generation of test suites for multi-path coverage of MPI programs with non-determinism, which can significantly reduce the testing cost and difficulty. We first design an indicator for evaluating each traversal set of communication edges, which is used to form a relation matrix between each target path and each traversal set of communication edges, so as to divide all the target paths into a certain amount of groups. Then, we construct an optimization model for test suite generation associated with each group. Finally, an evolutionary optimization algorithm is extended to solve each model, and used to generate a test suite covering each group of target paths. The proposed approach is utilized and compared with several state-of-the-art approaches to seven benchmark MPI programs, as well as the experimental results illustrate that the proposed approach can efficiently generate a test suite, thus supporting the superiority of the proposed approach.
Test data generation is one of the main tasks of software testing. The goal of test data generation based on search algorithms is to automate the task and find test data that meet test criteria. In this study, an evol...
详细信息
Test data generation is one of the main tasks of software testing. The goal of test data generation based on search algorithms is to automate the task and find test data that meet test criteria. In this study, an evolutionary generation method for test data that cover multiple paths is proposed. Firstly, the method obtains the coverage balance for each target path based on the number of individuals traversing the true and false branches of branch nodes, and calculates the individual's influence on coverage balance before and after an individual joining based on our previous work. Then, according to the number of branch nodes on each target path, the weights of different target paths are designed to obtain the individual fitness to adjust the evolution process and quickly generate test data covering multiple target paths. Finally, the proposed method is compared with existing techniques. Experimental results of benchmark programs and industrial use cases show that the proposed method can effectively improve the efficiency of test data generation for multiple paths.
Automatically generating test data to cover multiple paths is a challenging problem. This paper presents a new niching PSO algorithm, called MNPSO, to deal with this problem. In MNPSO, all particles are dynamically di...
详细信息
ISBN:
(纸本)9780769550169
Automatically generating test data to cover multiple paths is a challenging problem. This paper presents a new niching PSO algorithm, called MNPSO, to deal with this problem. In MNPSO, all particles are dynamically divided into several sub-populations and each sub-population has its global best position. The best positions of each particle are recorded for sub-populations. Test data is generated for one target path in each sub-population and the center of each sub-population is its global best positions. The results of experiments showed that MNPSO improved the efficiency of multi-path test data generation and multi-path coverage.
暂无评论