Font Size: a A A

Research On Path-Oriented Automatic Stub Generation Based On Method Modeling

Posted on:2016-04-03Degree:MasterType:Thesis
Country:ChinaCandidate:C YaoFull Text:PDF
GTID:2298330467492607Subject:Computer Science and Technology
Abstract/Summary:PDF Full Text Request
In modern software testing, unit testing is an important test methods. It tests function module as the minimum unit of the software. Any function modules are not independent, which need to call other function modules to complete the target function. An external function call’s behavior is determined by the function it calls, so it can not be inferred by the statement itself. How to deal with the function call is one of the key issues correctly unit tests.The paper around two aspects to improve the precise degree of automatic stub:(1) proposing a function modeling based on context-sensitive. In this method, which let symbolic execution, data flow analysis, abstract memory modeling techniques, and the path-sensitive interval computing technology as the core, can simulate the external function call’s behavior and save the complete information of external function;(2) proposing automated code generation method. The goal of this method is generating stub method automatically, which can reduce manual intervention. To achieve this goal, this paper designs a method based on function modeling. This method can complete the translation process of C code method to a stub automatically. Via the two aspects of the work, the unit test can be freed from human intervention, complete stub generation automatically. Test efficiency has improved greatly.This paper achieves above method in Code Test System and tests the code in a large open-source code (scipy-0.7.0). The results show that this method will increase the average coverage rate from43.76%to65.94%. For individual expression is more a function of a single variable, coverage increased nearly doubled, and supports automated piling correct, verify the role of this method in the unit tests.
Keywords/Search Tags:symbolic execution, function modeling, stub-generation, path sensitive
PDF Full Text Request
Related items