Abstract

Interactions between aspects and classes are a new source for faults. Existing objectoriented testing techniques are not adequate for testing aspect-oriented programs. As a consequence, new testing techniques must be developed. We present, in this paper, a state-based unit testing technique for aspect-oriented programs and associated tool (AJUnit). The technique focuses on the integration of one or several aspects to a class. The objective is to ensure that the integration is done without affecting the original behavior of the class. AJUnit, based on the model of JUnit, generates testing sequences covering an aspect(s)-class block of code. It also supports the execution and verification of the generated sequences. We focus on AspectJ programs. Testing an aspect(s)-class block is done incrementally. Furthermore, the generated sequences are archived. In the case of a change instantiated on a class or on one of its related aspects, only the testing sequences corresponding to the affected parts of the code are retested. The same approach is followed when introducing a new aspect influencing the class under test. The technique is based on several testing criteria that we defined. The generation and verification process of the testing sequences is completely automated.

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.