Font Size: a A A

Design And Implementation Of Path Selection Algorithm In Coverage Testing

Posted on:2016-02-22Degree:MasterType:Thesis
Country:ChinaCandidate:M YuFull Text:PDF
GTID:2298330467992587Subject:Computer Science and Technology
Abstract/Summary:PDF Full Text Request
With the popularity of personal computer, internet and mobile terminal, all kinds of software increase in demand. Due to the deviation in the development process, there are always faults in the software code, which may bring bad using experiences, even safety concerns. Therefore, software testing is indispensable in the process of software development. Automated testing can relieve programmers from boring testing work and thus has broad prospect for development.Unit test is one link in software testing, aiming at high coverage of the code and discovering of the bugs. The unit test process referred in this article includes code pretreatment, control flow graph generation, executable path generation and test case generation. Generation of executable path determines whether the test case can be generated and effective testing path will lead to less number of cases to generate higher coverage.Focusing on how to generate executable path, following research work has been done.(1) For loop execution path selection problem, this paper puts forward a method of determining the type of the cycle and adopting different routing methods, so as to improve the routing efficiency of the cycle and generate path more effectively.(2) About how to choose the path, this article proposes a path selection framework based on backtracking method. The framework traverses control flow graph of the tested program by backtracking method, targeted at coverage element. Starting from the function entry node, the framework uses depth-first traversal to generate a complete path. Whether the current partial path is executable and whether the current tail node can reach the target element, decide the framework to backtrack. Finally, test results of Linux projects reveal that statement, branch, MCDC path choosing can obtain higher coverage than before, verifying the method can be applied to a variety of routing under different coverage criteria.(3) Due to that code error often occurs on the boundary of the condition, article puts forward a boundary value test in coverage testing, and the corresponding method to select path in this test, which provides basis for the follow-up generation of boundary value coverage cases.
Keywords/Search Tags:coverage testing, path selection, cycle analysis, inaccessible path
PDF Full Text Request
Related items