|
ABSTRACT
Aspect-oriented software development is gaining popularity with the wider adoption of languages such as AspectJ. To reduce the manual effort of testing aspects in AspectJ programs, we have developed a framework, called Aspectra, that automates generation of test inputs for testing aspectual behavior, i.e., the behavior implemented in pieces of advice or intertype methods defined in aspects. To test aspects, developers construct base classes into which the aspects are woven to form woven classes. Our approach leverages existing test-generation tools to generate test inputs for the woven classes; these test inputs indirectly exercise the aspects. To enable aspects to be exercised during test generation, Aspectra automatically synthesizes appropriate wrapper classes for woven classes. To assess the quality of the generated tests, Aspectra defines and measures aspectual branch coverage (branch coverage within aspects). To provide guidance for developers to improve test coverage, Aspectra also defines interaction coverage. We have developed tools for automating Aspectra's wrapper synthesis and coverage measurement, and applied them on testing 12 subjects taken from a variety of sources. Our experience has shown that Aspectra effectively provides tool supports in enabling existing test-generation tools to generate test inputs for improving aspectual branch coverage.
REFERENCES
Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.
| |
1
|
AspectJ compiler 1.2, May 2004, http://eclipse.org/aspectj/.
|
| |
2
|
abc: The AspectBench Compiler for AspectJ, version 1.0.2, Feburary 2005. http://aspectbench.org/.
|
| |
3
|
Apache Avalon Framework, August 2005. http://excalibur.apache.org/.
|
| |
4
|
R. T. Alexander, J. M. Bieman, and A. A. Andrews. Towards the systematic testing of aspect-oriented programs. Technical Report CS-4-105, Department of Computer Science, Colorado State University, Fort Collins, Colorado, 2004.
|
| |
5
|
|
| |
6
|
R. D. Asberry. Aspect oriented programming (AOP): Using AspectJ to implement and enforce coding standards. Draft manuscript, 2002.
|
 |
7
|
Pavel Avgustinov , Aske Simon Christensen , Laurie Hendren , Sascha Kuzins , Jennifer Lhoták , Ondřej Lhoták , Oege de Moor , Damien Sereni , Ganesh Sittampalam , Julian Tibble, abc: an extensible AspectJ compiler, Proceedings of the 4th international conference on Aspect-oriented software development, p.87-98, March 14-18, 2005, Chicago, Illinois
[doi> 10.1145/1052898.1052906]
|
| |
8
|
|
 |
9
|
|
| |
10
|
|
| |
11
|
M. Dahm and J. van Zyl. Byte Code Engineering Library, April 2003. http://jakarta.apache.org/bcel/.
|
 |
12
|
Bruno Dufour , Christopher Goard , Laurie Hendren , Oege de Moor , Ganesh Sittampalam , Clark Verbrugge, Measuring the dynamic behaviour of AspectJ programs, Proceedings of the 19th annual ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, October 24-28, 2004, Vancouver, BC, Canada
|
 |
13
|
Jan Hannemann , Gregor Kiczales, Design pattern implementation in Java and aspectJ, Proceedings of the 17th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, November 04-08, 2002, Seattle, Washington, USA
|
| |
14
|
|
| |
15
|
Y. Hassoun, R. Johnson, and S. Counsell. Emprical validation of a dynamic coupling metric. Technical Report BBKCS-04-03, Birbeck College London, March 2004.
|
 |
16
|
|
| |
17
|
JUnit, 2003. http://www.junit.org.
|
| |
18
|
G. Kiczales, J. Lamping, A. Menhdhekar, C. Maeda, C. Lopes, J.-M. Loingtier, and J. Irwin. Aspect-oriented programming. In Proc. 11th European Conference on Object-Oriented Programming, pages 220--242. 1997.
|
 |
19
|
|
| |
20
|
R. Laddad. AspectJ in Action. Manning, 2003.
|
 |
21
|
|
 |
22
|
|
| |
23
|
C. V. Lopes and T. Ngo. Unit testing aspectual behavior. In Proc. AOSD 05 Workshop on Testing Aspect-Oriented Programs, March 2005.
|
| |
24
|
R. E. Lopez-Herrejon and D. Batory. Using AspectJ to implement product-lines: A case study. Technical report, University of Texis at Austin, September 2002.
|
 |
25
|
|
| |
26
|
Parasoft. Jtest manuals version 4.5. Online manual, April 2003. http://www.parasoft.com/.
|
 |
27
|
|
 |
28
|
|
| |
29
|
|
 |
30
|
Peri Tarr , Harold Ossher , William Harrison , Stanley M. Sutton, Jr., N degrees of separation: multi-dimensional separation of concerns, Proceedings of the 21st international conference on Software engineering, p.107-119, May 16-22, 1999, Los Angeles, California, United States
[doi> 10.1145/302405.302457]
|
 |
31
|
|
| |
32
|
T. Xie, D. Marinov, and D. Notkin. Improving generation of object-oriented test suites by avoiding redundant tests. Technical Report UW-CSE-04-01-05, University of Washington Department of Computer Science and Engineering, Seattle, WA, Jan. 2004.
|
| |
33
|
|
| |
34
|
T. Xie, D. Marinov, W. Schulte, and D. Noktin. Symstra: A framework for generating object-oriented unit tests using symbolic execution. In Proc. the International Conference on Tools and Algorithms for the Construction and Analysis of Systems (TACAS 2005), April 2005.
|
| |
35
|
D. Xu, W. Xu, and K. Nygard. A state-based approach to testing aspect-oriented programs. In Proc. 17th International Conference on Software Engineering and Knowledge Engineering, July 2005.
|
| |
36
|
J. Zhao. Tool support for unit testing of aspect-oriented software. In Proc. OOPSLA'2002 Workshop on Tools for Aspect-Oriented Software Development, Nov. 2002.
|
| |
37
|
|
| |
38
|
Y. Zhou, D. Richardson, and H. Ziv. Towards a practical approach to test aspect-oriented software. In Proc. 2004 Workshop on Testing Component-based Systems (TECOS 2004), Net.ObjectiveDays, Sept. 2004.
|
 |
39
|
|
CITED BY 12
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Haihao Shen , Sai Zhang , Jianjun Zhao , Jianhong Fang , Shiyuan Yao, XFindBugs: eXtended FindBugs for AspectJ, Proceedings of the 8th ACM SIGPLAN-SIGSOFT workshop on Program analysis for software tools and engineering, November 09-10, 2008, Atlanta, Georgia
|
|
|
|
|
|
Mark Harman , Fayezin Islam , Tao Xie , Stefan Wappler, Automated test data generation for aspect-oriented programs, Proceedings of the 8th ACM international conference on Aspect-oriented software development, March 02-06, 2009, Charlottesville, Virginia, USA
|
INDEX TERMS
Primary Classification:
D.
Software
D.2
SOFTWARE ENGINEERING
D.2.5
Testing and Debugging
Subjects:
Testing tools (e.g., data generators, coverage testing)
General Terms:
Experimentation,
Measurement,
Reliability,
Verification
Keywords:
AspectJ,
aspect-oriented programs,
aspect-oriented software development,
coverage criteria,
coverage measurement,
software testing,
test generation
|