Font Size: a A A

Research On Unit Testing Technique Of Aspect-Oriented Programs

Posted on:2009-04-29Degree:MasterType:Thesis
Country:ChinaCandidate:L H ChenFull Text:PDF
GTID:2178360278456681Subject:Computer Science and Technology
Abstract/Summary:PDF Full Text Request
As a new technique, Aspect-oriented programming(AOP) is gaining popularity for its ability of modularizing crosscutting concerns of a software system. However, same like other programming languages, AOP brings some challenges as well as advantages. It is difficult to test aspect-oriented programs with traditional ways for its new characteristic. Hence, lacking of mature techniques for aspect testing will be a bottleneck problem of preventing aspect-oriented programming from massive application.This paper analyses the core issues of testing aspect-oriented programs. Based on AspectJ programs, we present a new way to test aspectual behavior. Surveying the research about unit tesing of aspect-oriented programs reveals the advantages of our solution. From the views of testing implementation and automated test, we make a study of the unit testing framework of AspectJ programs and the strategy of automated test generation for the programs. With the help of Java annotation and reflection mechanism, each tested aspectual can be associated with a tesing object. After analysing the characters of compiled aspect, we set up a rule of parsing the tested aspect. The strategy automates the testing process by using techniques of generating test cases randomly, supplemented by optimizing of test cases with respect to test adequacy criterion, and from certain paths as well. The paper implements AJUnit, a framework for automatically generating unit tests for AspectJ programs. AJUnit includes three parts: the main framework, the automated testing data generator and automated testing code generator. Finally, we test and analyse an example of AspectJ program.The tool introduced in this paper can help to unit test aspect-oriented programs. It improves efficiency of aspect-oriented software development and insures programs with reliability and creditability.
Keywords/Search Tags:Aspect-oriented software development, unit testing, testing framework without weaving, testing data generation, AspectJ
PDF Full Text Request
Related items