A Test-Driven Approach to Developing Pointcut Descriptors in AspectJ

被引:14
作者
Delamare, Romain [1 ]
Baudry, Benoit [1 ]
Ghosh, Sudipto [2 ]
Le Traon, Yves [3 ]
机构
[1] IRISA INRIA Rennes, Rennes, France
[2] Colorado State Univ, Colorado Springs, CO USA
[3] T Telecom Bretagn, Plouzane, France
来源
SECOND INTERNATIONAL CONFERENCE ON SOFTWARE TESTING, VERIFICATION, AND VALIDATION, PROCEEDINGS | 2009年
关键词
Aspect-oriented programming; joinpoints; pointcut descriptors; mutation analysis; test-driven development; testing tool;
D O I
10.1109/ICST.2009.41
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Aspect-oriented programming (AOP) languages introduce new constructs that can lead to new types of faults, which must be targeted by testing techniques. In particular AOP languages such as AspectJ use a point-cut descriptor (PCD) that provides a convenient way to declaratively specify a set of joinpoints in the protogram where the aspect should be woven. However a major difficulty when testing that the PCD matches the intended set of joinpoints is the lack of precise specification for this set other than the PCD itself. In this paper we propose a test-driven approach for the development and validation of the PCD. We developed a tool, AdviceTracer which enriches the JUnit API with new types of assertions that can be used to specify the expected joinpoints. In order to validate our approach, we also developed a mutation tool that systematically injects faults into PCDs. Using these two tools, we perform experiments to validate that our approach can be applied for specifying expected joinpoints and for detecting faults in the PCD.
引用
收藏
页码:376 / +
页数:2
相关论文
共 19 条
[1]  
ANBALAGAN P, 2006, MUTATION 2006, P51
[2]  
BAEKKEN J, 2006, ISSRE 06 INT S SOFTW, P69
[3]  
Beck K, 2003, TEST DRIVEN DEV EXAM
[4]  
DELAMARE R, ADVICETRACER
[5]  
Evertsson G., 2003, Tetris in AspectJ
[6]  
FERRARI FC, 2008, ICST 08
[7]  
HARROLD MJ, 2001, OOPSLA 2001, P312
[8]  
Koppen C., 2004, EUR INT WORKSH ASP S
[9]  
LEMOS OAL, 2006, WTAOP 06, P33
[10]  
LOPES CV, 2005, P 1 WORKSH TEST ASP