Font Size: a A A

Aspect Oriented Programming Applied In Software Unit Testing

Posted on:2007-04-06Degree:MasterType:Thesis
Country:ChinaCandidate:F B XuFull Text:PDF
GTID:2178360185961693Subject:Computer software and theory
Abstract/Summary:PDF Full Text Request
Software unit test is to find bugs in the software smallest unit. Unit test is the first testing process and it's the basis of and system level test Unit test is critical to software quality. Unit test also plays an import role in other research areas: unit test cases need to be written before writing any implementation code in test driven development; an reliable unit test environment is the most important premise to do software recapturing.Aspect-Oriented Programming (AOP) is first proposed by Xerox PARC as a new programming model in the 90's of the last century. AOP enables developers to separate the auxiliary tasks from the main task. The essence of AOP is to separate different concerns, these concerns including the key concern and crosscut concerns. Every crosscut concerns can be implemented individually by using languages of Apotheoses crosscut concerns will be weave into the main concern during compile or execution time. As a supplement of OOP, AOP, along with it's development tools and enviroment, is getting more and more popular.This article thoroughly studied both AOP and software unit test technology and found the relationship between the two. By looking into the unit test itself deeply and applying Erik Ernst's standard, the author draw the conclusion that unit test in one crosscut concern of the unit to test.Then, by researching some difficult problems encountered in unit test, the author solved these problems using both conventional way and the more simple and effective AOP's way. So it is proved that AOP is not only theoretically help for unit test, but AOP can also solved many real problems. For example, these problems includes separation of outer service from unit being tested, getting the private class member of the tested class. Other problems like legacy code testing are also discussed.An Aspect-Oriented unit test framework called ATest is presented on the foundation on the above researching. The framework uses the AspectJ language to solve unit test problems. The solutions to the difficulties found in unit test is already integrated in the test framework. Implementing some interfaces can also extend the framework. By using this way, new solutions can be added to the framework and the framework will become more and more useful.Summarize of the researching work is given in the last chapter. AOP technology applied in unit test area in the future is also discussed.
Keywords/Search Tags:unit test, Aspect-Oriented Programming, Crosscut concerns, Atest
PDF Full Text Request
Related items