| During the software development process,any modifications made to the software at any stage may have an impact on the software.The modification may come from the correction of defects in software development,or it may be the temporary acceptance of new customer requirements and the addition of new functional modules.When such a situation occurs,it is necessary to promptly follow up on the modification of defects and improve the management of defects,otherwise the correction of these defects may be omitted.Therefore,when there is a change in the software,it is necessary to pass the software test and recheck whether the existing functions of the software operate normally as expected.At the same time,it is also necessary to add new test cases to test new or modified functional modules.Realistic software development is a process of continuous updating and iteration,and new versions are usually released every few days.Therefore,multiple regression tests are required to ensure the quality of software products.Optimization of test case sets is one of the main methods to improve the efficiency of regression testing,including test case selection,test case reduction,and test case prioritization.This thesis focuses on analyzing the source code based test case prioritization technology.In the actual use process,it is found that the source code based basic prioritization strategy Additional has randomness in the selection of test cases when the code coverage rate of the test cases is the same.This thesis optimizes this deficiency and proposes an Additional FD strategy.This strategy is used when several test cases have the same coverage rate,Compare the severity of the impact of defects on these test cases,and assign higher priority to test cases with higher severity of defects,to avoid the instability of sorting results caused by the randomness of Additional.In this thesis,a validation experiment was conducted using a SIR dataset,and the experimental results of the two strategies were compared.The results indicate that the average APFD of the test case sequence using the Additional FD strategy is higher than that of the Additional strategy,which improves the defect detection ability of the test case sequence and has strong stability.In view of the poor stability of the three basic source code based test case prioritization algorithms(Total、Additional、2-Optimal),this thesis proposes a test case prioritization strategy based on a comprehensive evaluation model.This strategy mainly uses the idea of mathematical modeling,The AHP analytic hierarchy process and Topsis superior and inferior solution distance method in mathematical modeling are used to calculate the relevant weight of test cases.The historical information generated by regression testing is used to combine the three basic random ranking strategies based on the ranking results generated by the three basic random ranking strategies,so as to optimize the ranking of test cases and improve the defect detection ability and stability of test case sequences.Select a SIR dataset for validation experiments,and compare the experimental results of three basic random sorting strategies with those based on a comprehensive evaluation model.By comparing the evaluation index APFD evaluation value of the optimized sequence,it is found that the test case prioritization strategies based on the comprehensive evaluation model are higher than the three basic random sorting strategies.Finally,the test case prioritization strategy based on the comprehensive evaluation model is applied to practical projects,and the test cases are executed according to the optimized ranking sequence.The execution results before and after the application are obtained and analyzed.The results show that under the same time and resource constraints,using the comprehensive evaluation model based prioritization strategy can detect more software defects,improve the efficiency of regression testing,and reflect the practicality of the strategy. |