skip to main content
10.1145/1119655.1119681acmotherconferencesArticle/Chapter ViewAbstractPublication PagesmodularityConference Proceedingsconference-collections
Article

A framework and tool supports for generating test inputs of AspectJ programs

Published: 20 March 2006 Publication History

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

[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]
K. Arnold, J. Gosling, and D. Holmes. The Java Programming Language. Addison-Wesley Longman Publishing Co., Inc., 2000.
[6]
R. D. Asberry. Aspect oriented programming (AOP): Using AspectJ to implement and enforce coding standards. Draft manuscript, 2002.
[7]
P. Avgustinov, A. S. Christensen, L. Hendren, S. Kuzins, J. Lhoták, O. Lhoták, O. de Moor, D. Sereni, G. Sittampalam, and J. Tibble. abc: an extensible AspectJ compiler. In Proc. 4th International Conference on Aspect-Oriented Software Development, pages 87--98, 2005.
[8]
B. Beizer. Software Testing Techniques. International Thomson Computer Press, 1990.
[9]
L. Bergmans and M. Aksits. Composing crosscutting concerns using composition filters. Commun. ACM, 44(10):51--57, 2001.
[10]
C. Csallner and Y. Smaragdakis. JCrasher: an automatic robustness tester for Java. Software: Practice and Experience, 34:1025--1050, 2004.
[11]
M. Dahm and J. van Zyl. Byte Code Engineering Library, April 2003. http://jakarta.apache.org/bcel/.
[12]
B. Dufour, C. Goard, L. Hendren, O. de Moor, G. Sittampalam, and C. Verbrugge. Measuring the dynamic behaviour of AspectJ programs. In Proc. 19th annual ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, pages 150--169, 2004.
[13]
J. Hannemann and G. Kiczales. Design pattern implementation in Java and AspectJ. In Proc. 17th ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, pages 161--173, 2002.
[14]
Y. Hassoun, R. Johnson, and S. Counsell. A dynamic runtime coupling metric for meta-level architectures. In Proc. 8th European Conference on Software Maintenance and Reengineering, pages 339--346, 2004.
[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]
E. Hilsdale and J. Hugunin. Advice weaving in AspectJ. In Proc. 3rd International Conference on Aspect-Oriented Software Development, pages 26--35, 2004.
[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]
J. C. King. Symbolic execution and program testing. Commun. ACM, 19(7):385--394, 1976.
[20]
R. Laddad. AspectJ in Action. Manning, 2003.
[21]
K. Lieberherr, D. H. Lorenz, and P. Wu. A case for statically executable advice: checking the law of demeter with aspectj. In Proc. 2nd International Conference on Aspect-Oriented Software Development, pages 40--49, 2003.
[22]
K. Lieberherr, D. Orleans, and J. Ovlinger. Aspect-oriented programming with adaptive methods. Commun. ACM, 44(10):39--41, 2001.
[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]
N. McEachen and R. Alexander. Distributing classes with woven concerns - a look into potential fault scenarios. In Proc. 4th International Conference on Aspect-Oriented Software Development, pages 192--200, March 2005.
[26]
Parasoft. Jtest manuals version 4.5. Online manual, April 2003. http://www.parasoft.com/.
[27]
H. Rajan and K. Sullivan. Aspect language features for concern coverage profiling. In Proc. 4th International Conference on Aspect-Oriented Software Development, pages 181--191, March 2005.
[28]
M. Rinard, A. Salcianu, and S. Bugrara. A classification system and analysis for aspect-oriented programs. In Proc. 12th International Symposium on the Foundations of Software Engineering, pages 147--158, 2004.
[29]
A. L. Souter, D. Shepherd, and L. L. Pollock. Testing with respect to concerns. In Proc. International Conference on Software Maintenance, page 54, 2003.
[30]
P. Tarr, H. Ossher, W. Harrison, and J. Stanley M. Sutton. N degrees of separation: multi-dimensional separation of concerns. In Proc. 21st International Conference on Software Engineering, pages 107--119, 1999.
[31]
W. Visser, C. S. Pasareanu, and S. Khurshid. Test input generation with Java PathFinder. In Proc. 2004 ACM SIGSOFT International Symposium on Software Testing and Analysis, pages 97--107, 2004.
[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]
T. Xie, D. Marinov, and D. Notkin. Rostra: A framework for detecting redundant object-oriented unit tests. In Proc. 19th IEEE International Conference on Automated Software Engineering, pages 196--205, Sept. 2004.
[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]
J. Zhao. Data-flow-based unit testing of aspect-oriented programs. In Proc. 27th IEEE International Computer Software and Applications Conference, pages 188--197, Nov. 2003.
[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]
H. Zhu, P. A. V. Hall, and J. H. R. May. Software unit test coverage and adequacy. ACM Comput. Surv., 29(4):366--427, 1997.

Cited By

View all
  • (2017)A Novel Technique for Testing an Aspect Oriented Software System using Genetic and Fuzzy Clustering Algorithm2017 International Conference on Computer and Applications (ICCA)10.1109/COMAPP.2017.8079770(90-96)Online publication date: Sep-2017
  • (2017)RAMBUTANSInternational Journal on Software Tools for Technology Transfer (STTT)10.1007/s10009-016-0432-319:6(743-761)Online publication date: 1-Nov-2017
  • (2016)SS-BDDProceedings of the 1st Brazilian Symposium on Systematic and Automated Software Testing10.1145/2993288.2993296(1-10)Online publication date: 19-Sep-2016
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Other conferences
AOSD '06: Proceedings of the 5th international conference on Aspect-oriented software development
March 2006
247 pages
ISBN:159593300X
DOI:10.1145/1119655
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

  • AOSD-Europe: European Network of Excellent on Aspect-oriented Software Development

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 20 March 2006

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. AspectJ
  2. aspect-oriented programs
  3. aspect-oriented software development
  4. coverage criteria
  5. coverage measurement
  6. software testing
  7. test generation

Qualifiers

  • Article

Conference

AOSD06
Sponsor:
  • AOSD-Europe

Acceptance Rates

Overall Acceptance Rate 41 of 139 submissions, 29%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)0
  • Downloads (Last 6 weeks)0
Reflects downloads up to 26 Jan 2025

Other Metrics

Citations

Cited By

View all
  • (2017)A Novel Technique for Testing an Aspect Oriented Software System using Genetic and Fuzzy Clustering Algorithm2017 International Conference on Computer and Applications (ICCA)10.1109/COMAPP.2017.8079770(90-96)Online publication date: Sep-2017
  • (2017)RAMBUTANSInternational Journal on Software Tools for Technology Transfer (STTT)10.1007/s10009-016-0432-319:6(743-761)Online publication date: 1-Nov-2017
  • (2016)SS-BDDProceedings of the 1st Brazilian Symposium on Systematic and Automated Software Testing10.1145/2993288.2993296(1-10)Online publication date: 19-Sep-2016
  • (2015)Testing of aspect-oriented programs: difficulties and lessons learned based on theoretical and practical experienceJournal of the Brazilian Computer Society10.1186/s13173-015-0040-121:1Online publication date: 20-Nov-2015
  • (2015)An approach and tool for measurement of state variable based data-flow test coverage for aspect-oriented programsInformation and Software Technology10.1016/j.infsof.2014.11.00859:C(233-254)Online publication date: 1-Mar-2015
  • (2015)Automated test generation technique for aspectual features in AspectJInformation and Software Technology10.1016/j.infsof.2014.05.02057(463-493)Online publication date: Jan-2015
  • (2014)A constraint-weaving approach to points-to analysis for AspectJFrontiers of Computer Science: Selected Publications from Chinese Universities10.1007/s11704-013-3106-28:1(52-68)Online publication date: 1-Feb-2014
  • (2012)Reducing test effortInformation and Software Technology10.1016/j.infsof.2012.04.00754:10(1092-1106)Online publication date: 1-Oct-2012
  • (2012)Testing aspect-oriented programs with finite state machinesSoftware Testing, Verification & Reliability10.1002/stvr.44022:4(267-293)Online publication date: 1-Jun-2012
  • (2011)Automated test data generation for mutation testing using AspectJ programs2011 International Conference on Image Information Processing10.1109/ICIIP.2011.6108854(1-5)Online publication date: Nov-2011
  • Show More Cited By

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media