Font Size: a A A

Research On Automatic Generation Unit Test Case For Concurrent Class Based On Deadlock

Posted on:2018-10-27Degree:MasterType:Thesis
Country:ChinaCandidate:L N ZangFull Text:PDF
GTID:2348330518993614Subject:Computer Science and Technology
Abstract/Summary:PDF Full Text Request
Concurrent faults are common in concurrent programs.Concurrent class is the basis for concurrent program development and testing.Deadlock is a common concurrent fault that is difficult to detect.Unit testing plays an important role in fault detection.Therefore,it is of great theoretical and practical value to study the generation unit test case of concurrent class for the early detection of deadlock failures and improve the quality of concurrent program.At present,the unit test case generation method for concurrent class is mainly based on the random method and the test method based on coverage criterion,but its test case detection ability and efficiency are both not high.According to the characteristics of concurrent faults,it is a way to improve the effectiveness of test case generation by analyzing the potential fault codes in concurrent class.In this thesis,focusing on deadlock fault in concurrent class,a method is proposed for automatic generating unit test case for concurrent class based on deadlock(short for AGTBD).The method analyzes the deadlock feature for the concurrent class,and the definition of parameter deadlock as a special deadlock is given,and deadlock analysis is carried out according to the deadlock feature of concurrent class.Then according to the deadlock characteristics of concurrent class,deadlock analysis is performed to find potential deadlock in concurrent class code,and then on this basis,concurrent class unit test cases are automatic generated combined with the serial unit test case tool Randoop.In order to verify the validity of the method AGTBD,this thesis takes 7 common classes in Java as the test object,uses AGTBD method to generate test cases,and compares AGTBD method with the random method and the test case generation method based on coverage criterion on the test case generation efficiency and deadlock detection ability.The experimental results show that the AGTBD method can find the potential deadlock in the concurrent class.Compared with other methods,the test case generation efficiency and deadlock fault detection ability of AGTBD method are improved.The experiment also further analyzes the influence of parametric deadlock on the test case generation and deadlock detection which provides a reference for test case generation of concurrent program and concurrent fault detection.
Keywords/Search Tags:concurrent class, deadlock detection, unit testing, test case generation
PDF Full Text Request
Related items