Font Size: a A A

Research On Prioritization And Reduction Methods Of Test Cases Based On Mutation And Clustering Technology

Posted on:2022-07-09Degree:MasterType:Thesis
Country:ChinaCandidate:L B LiFull Text:PDF
GTID:2518306530998289Subject:Software engineering
Abstract/Summary:PDF Full Text Request
In recent years,with the rapid development of the Internet in the information age,the application of software in human social life has become more and more common.The popularization of mobile payment,the Internet of Things,cloud computing,and AI technologies all rely on software as the carrier.Enter the society of smart software.At the same time,the scale of software is rapidly expanding,and the complexity of software continues to increase.How to ensure the quality of software has put forward new requirements for software testing technology.Among them,because the software version is updated more frequently,software engineers ensure the quality of the software system by performing regression testing,which means that regression testing need to be performed multiple times during the entire software life cycle.Therefore,improving the efficiency of regression testing has important practical significance for ensuring the quality and rapid delivery of software systems.Mutation testing is also called mutation analysis.It is a software testing technology based on program source code failures.It generates mutation programs by making reasonable grammatical changes to the source program code,and then the test cases execute the mutation programs to evaluate the effectiveness of the test cases,and then guide software engineers modify or design higher-quality test cases.At present,this technology is one of the most effective techniques for assessing the adequacy of test case sets.In regression testing,test case prioritization and test case set reduction are two different research problems,but they are essentially interrelated.Prioritize the test cases,and there will always be some test cases with repeated detection capabilities;after the test case set is reduced,when the regression test is executed again,a new test case execution order is required.In order to improve the time efficiency of overall regression testing,this thesis uses mutation and clustering techniques to prioritize and reduce test cases.Considering the diversity of test cases,select edge test cases from clustering clusters;according to the similarity of test cases,cluster test cases with the same fault detection capability into the same cluster,thereby reducing a large number of similar test cases.Aiming at the problem of multiple execution of test cases in the process of regression testing that consumes a lot of time and computational cost,this thesis proposes a multipriority selection method framework based on mutation and clustering technology,which can prioritize and reduce test cases,and execute them again in regression testing,the prioritized and reduced test case set can be used to improve the overall efficiency of regression testing and achieve the task of rapid delivery of the software system.In this framework,there are two parts in total.In the first part,the Multi-Priority Selection Method(MPS)is proposed.First,perform mutation analysis on the source program to obtain the log file after the mutation analysis.Based on these log information,a log analysis algorithm is proposed to convert the log information into matrix information.The value in each matrix represents whether the test case can kill the corresponding mutation program.Secondly,by changing the weight of the test case,it is transformed into a multi-priority matrix,and the high-dimensional matrix is disassembled according to the same mutation operator and divided into a matrix of mutation program units.The mutation program in each mutation program unit is changed by the same mutation.Then the matrix of mutant program units is clustered in parallel,and high-priority test cases are selected from the clusters of test cases after clustering.Finally,each mutation program unit can obtain a reduced test case set,integrate the results,add test cases incrementally to the set,and perform another priority sorting operation to obtain the final prioritization and reduction.In the update test case set part,first copy a copy of the test case set source file,map the number in the set to the name of the test case,remove the test cases that do not appear in the set,and adjust the execution order of the test methods,again performing regression testing,use the prioritized and reduced test case set to improve the overall testing efficiency of the regression testing process.The MPS algorithm in the multipriority selection method evaluates 395 real-world open source program data sets and five existing algorithms.The experimental results show that the MPS algorithm can ensure the loss of the lower test case set error detection ability through parallel clustering,and reduce the calculation cost.Compared with other heuristic algorithms,it has certain advantages.The MPS algorithm mainly has the following characteristics:1)Diversity and similarity: Consider the diversity and similarity of test cases at the same time,cluster test cases with similar fault detection capabilities into the same cluster,and select edge test cases in each test case cluster.The use of the similarity distance ratio to control the number of clusters generated solves the problem of specifying the number of fixed K clusters in advance.The MPS algorithm will not be affected by various similarity distance calculation methods,and has a significant advantage in retaining test cases that trigger real program faults.2)Fast speed and high performance: The number of test cases in the software system can reach tens of thousands,and the generated matrix has a high dimensionality.It is expensive to calculate the similarity between test cases and takes a lot of time and cost.The MPS algorithm uses matrix disassembly and parallel clustering,adding test cases in a distributed and incremental manner,can greatly reduce computing costs,can better handle higher latitude test case sets,and have faster calculation speed.3)Flexibility and scalability: Set different similarity distance ratio thresholds to generate different number of test case clusters.The MPS algorithm can adjust the number of clusters according to different test targets,which has strong flexibility.For the multipriority selection method framework,it can be integrated with the automatic test case generation tool in the mutation analysis stage,which can realize the automatic generation of test cases and the automatic execution of regression testing.The whole framework is easy to expand.
Keywords/Search Tags:Multi-priority selection method, Mutation testing, Clustering, Test case prioritization, Test case set reduction
PDF Full Text Request
Related items