Font Size: a A A

Research On Methods For Generating AOP Test Cases Based On Predicate Dynamic Slicing

Posted on:2013-05-23Degree:MasterType:Thesis
Country:ChinaCandidate:B WangFull Text:PDF
GTID:2248330371476212Subject:Computer software and theory
Abstract/Summary:PDF Full Text Request
Aspect-oriented programming (AOP) is the complement and perfection of the technology of object-oriented programming (OOP), while efficient AOP testing method is the quality assurance of AOP.Nowadays, there are mainly four ways as follows to run aspect-oriented programming test.Firstly, Zhao Jian-jun proposed a data stream based unit testing method, which is mainly concerned about the assignment of each variable in the program. Zhao used control flow graph to construct aspects and def-use pairs and then chose appropriate test strategies.The main problem of this method was that around advice may change the results of def-use pairs. Secondly, Xu Dian-xiang and et al proposed a state-based testing method, which transformed the aspect-oriented state model (ASM) into a tree structure, and all the test cases obtained from the tree could run complete tests to object behaviors, aspects, as well as the interactions between classes. However, it couldn’t resolve the combinatorial explosion problem of status.Thirdly, Xu wei-feng and et al utilized AFG based AFG and migration tree to run tests, which produced executable test cases based on coverage criteria.In this way, the defects caused by the modification of control flow dependency were mainly detected and the advice of static application of the advice could be denoted but the advice of dynamic applications couldn’t.The fourth method was about the independent testing of aspects,which was only for a specific AOP language, and the focus was right to achieve the tests of aspects while ignored interactions between aspects and classes.In this paper, we propose an effective testing method which is based on Predicate Dynamic Slicing. First of all, our method constructs Complete AOP Statement Control Flow Graph which contains the aspect, pointcut, join point and advice of AOP. Then, the method generates all of the paths of AOP from Complete AOP Statement Control Flow Graph and constructs branched function of each path to obtain its corresponding testing data. If the path cannot execute, the method fails to generate the testing data. During this procedure, it would build Simplified Dynamic Dependency Graph to generate the predicate dynamic slicing which can help to adjust the test data afterwards. Ultimately, to each path, we compare the actual output with desired output to decide whether the software has bugs or not. Cases analysis and experimental results show that our solution can test an integrated AOP systematically, meanwhile improve the efficiency when producing the testing data, and eventually obtain valid test cases.
Keywords/Search Tags:Aspect-oriented programming, Statement control-flow graph, Predicate dynamic slicing, Branched function
PDF Full Text Request
Related items