Detecting Redundant Unit Tests for AspectJ Programs
Tao Xie, Jianjun Zhao, Darko Marinov and David Notkin
17th International Symposium on Software Reliability Engineering (ISSRE 06)
Raleigh, North Carolina, USA, November 6-11, 2006
Abstract
Aspect-oriented software development is gaining popularity with the adoption of languages such as AspectJ. Testing is an important part in any software development, including aspect-oriented development. To automate generation of unit tests for AspectJ programs, we can apply the existing tools that automate generation of unit tests for Java programs. However, these tools can generate a large number of tests, and it is time consuming to manually inspect them all. This paper proposes Raspect, a framework for detecting redundant unit tests for AspectJ programs. We introduce three levels of units in testing AspectJ programs: advised methods, advice, and intertype methods, and show how to detect at each level redundant tests that do not exercise new behavior. Our approach selects only non-redundant tests from the automatically generated test suites, thus allowing the developer to spend less time in inspecting this minimized set of tests. We have implemented Raspect and applied it on 12 subjects taken from a variety of sources; our experience has shown that it can effectively reduce the size of generated test suites for inspecting AspectJ programs.