Abstract:
This paper proposes test-based pointcuts, a new aspect-oriented programming language construct that uses unit test cases as interface of crosscutting concerns. A test-based pointcut primarily specifies a set of test cases associated to a program. At execution time, it matches the join points that have the same execution history to the one of the specified test cases. The test-based approach improves pointcut definitions in two respects. First, test-based pointcuts are less fragile with respect to program changes because rather than directly relying on type and operation names in a program, they indirectly specify join points through unit test cases, which are easier to be kept up-to-date. Second, test-based pointcuts can discriminate execution histories without requiring to specify detailed execution steps, as they use test cases as abstractions of execution histories. With the abstractions, the second respect contributes to the first respect. We designed and implemented the test-based pointcuts as an extension to AspectJ, and confirmed, through an case study, test-based pointcuts are more robust against evolution when used for a practical application program.
Reference:
Test-based Pointcuts: A Robust Pointcut Mechanism Based on Unit Test Cases for Software Evolution (Kouhei Sakurai and Hidehiko Masuhara), In Workshop on Linking Aspect Technology and Evolution (LATE 2007), 2007.
Bibtex Entry:
@inproceedings{sakurai2007late,
month = mar,
location = {Vancouver, Canada},
year = 2007,
url = {https://web.archive.org/web/20160516092525/http://www.aosd.net/workshops/late/2007/},
booktitle = {Workshop on Linking Aspect Technology and Evolution (LATE 2007)},
author = {Kouhei Sakurai and Hidehiko Masuhara},
title = {Test-based Pointcuts: A Robust Pointcut Mechanism Based on Unit Test Cases for Software Evolution},
keywords = {AspectJ},
pdf = {late2007.pdf},
abstract = {This paper proposes test-based pointcuts, a new aspect-oriented
programming language construct that uses unit test cases as interface of crosscutting concerns. A test-based pointcut primarily specifies a set of test cases associated to a program. At execution time, it matches the join points that have the same execution history to the one of the specified test cases. The test-based approach improves pointcut definitions in two respects. First, test-based pointcuts are less fragile with respect to program changes because rather than directly relying on type and operation names in a program, they indirectly specify join points through unit test cases, which are easier to be kept up-to-date. Second, test-based pointcuts can discriminate execution histories without requiring to specify detailed execution steps, as they use test cases as abstractions of execution histories. With the abstractions, the second respect contributes to the first respect. We designed and implemented the test-based pointcuts as an extension to AspectJ, and confirmed, through an case study, test-based pointcuts are more robust against evolution when used for a practical application program.}
}