Mariano Ceccato, Paolo Tonella, Filippo Ricca.
Is AOP code easier or harder to test than OOP code?
The adoption of traditional testing techniques with AOP systems is
expected to be quite hard, because of the novel constructs offered by AOP.
For example, testing should validate the pointcut designators, which define
the execution points at which aspects apply. These may be difficult to test
when they involve complex dynamic conditions, depending
on the execution stack. Other sources of difficulties are associated with
the aspect composition order, with the inter-type declarations, and with
the changes in normal and exceptional control flow, possibly introduced by
On the other hand, a novel, aspect oriented approach to testing could be
devised, which takes advantage of the separation of concerns implemented in
AOP code, in order to extend the benefits of such separation to the testing
phase. In this paper, an incremental testing process is considered, which
allows testing the base code and the crosscutting functionalities,
implemented as aspects, in separate, successive steps.