Font Size: a A A

Research On A-star-based Junit Test Case Repair And Concurrency Optimization

Posted on:2021-01-16Degree:MasterType:Thesis
Country:ChinaCandidate:X H YangFull Text:PDF
GTID:2428330605475998Subject:Computer technology
Abstract/Summary:PDF Full Text Request
Software regression testing is an important means to ensure software quality.The code changes of software evolution may lead test cases of the old version could not be reused directly on the new version of the software,which reduces the efficiency of regression testing.Test case repair provides an effective solution for test case reuse.JAVA unit test case repair is one of the hot issues in regression testing research in recent years.The search-based algorithm has been applied to the automatic repair of JAVA unit test cases due to its advantages of good versatility and fast solution speed.By searching for a sequence of methods that can be used to repair unit test cases in the new version of the software,the unit test cases are repaired so that they can be executed on the new version of the software.However,the existing repair sequence generation method takes the error point of the test case to be repaired as the point to be repaired,starting from the entry method of the test case,by searching for the method/global variable that can be used to repair in the new version of the software,and stepping down Generate a repair sequence to repair the error point.This method not only does not consider the dependency relationship between the error points of the test cases,but also the lack of target guidance for the generation of repair sequences,resulting in a low efficiency of the generation of repair sequences.In order to improve the efficiency of repairing JAVA unit test cases,this paper proposes a method of repairing and concurrent optimization of JAVA unit test cases based on A*search.By analyzing the dependency relationship between the error points of the test cases,try to select the error points that do not depend on other error points as the points to be repaired,and determine the repair target.Repair sequence generation starts from the repair target,search upward for the methods/global variables for repair in the new version of the software,until the entry method of the test case.The search process also considers the impact of the repair sequence on the test cases of the old version and the data dependencies within the repair sequence,and calculates the A*valuation function to guide the search process.On this basis,the test cases are repaired according to the repair sequence,that is,as far as possible to retain the intact methods,parameters and use relationships in the old version of the software test cases,in order to retain the original test case semantics and test intent.In addition,the concurrent optimization of repair sequence generation and test case repair was carried out in this paper.By overlapping CPU calculations and IO operations and using CPU concurrent computing power,the time spent on test case repair is further shortened.In order to evaluate the effectiveness of the test case repair method and concurrent optimization in this paper,the test cases of four different versions of open source programs are used as objects to repair the test cases of the old version of the program and reuse them on the new version of the program.Experiments show that,compared with the existing test case repair methods,the proposed repair method can shorten the repair time and improve the repair efficiency while ensuring the success rate of test case repair.The concurrency optimization of the repair method in this article reduces 60%of the repair time,further improves the concurrent processing capacity of the system,improves the CPU utilization,and improves the repair efficiency.
Keywords/Search Tags:software testing, test case repair, a-star algorithm, java unit test case
PDF Full Text Request
Related items