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

State-based incremental testing of aspect-oriented programs

Published:20 March 2006Publication History

ABSTRACT

Taking aspects as incremental modifications to their base classes, this paper presents an incremental approach to testing whether or not aspect-oriented programs and their base classes conform to their respective behavior models. We exploit a rigorous aspect-oriented extension to state models for capturing the impact of aspects on the state transitions of base class objects as well as an explicit weaving mechanism for composing aspects into their base models. We generate abstract tests for base classes and aspect-oriented programs from their state models. As base class tests are not necessarily valid for aspect-oriented programs, we identify several rules for maximizing reuse of concrete base class tests for aspects according to the state-based impact of aspects on their base classes. To illustrate our approach, we use two examples that indicate distinctive types of aspect-oriented applications and exhibit fundamental features in complex applications: aspects removing state transitions from base classes and aspects adding and modifying state transitions in base classes. Our results show that majority of base class tests can be reused for aspects, but subtle modifications to some of them are necessary. In particular, positive (or negative) base class tests can become negative (or positive) aspect tests. We also discuss how several types of aspect-specific faults can be revealed by the state-based testing.

References

  1. Aldawud, O., Bader, F., and Elrad, T. Weaving with Statecharts. The Second International Workshop on Aspect Oriented Modeling. 2002.Google ScholarGoogle Scholar
  2. Aldawud, T. and Bader, A. UML profile for aspect-oriented software development, The Third International Workshop on Aspect Oriented Modeling, 2003.Google ScholarGoogle Scholar
  3. Alexander, R. T., Bieman, J. M., and Andrews, A. A. Towards the systematic testing of aspect-oriented programs, Technical Report, Colorado State University. http://www.cs.colostate.edu/~rta/publications/CS-04-105.pdf.Google ScholarGoogle Scholar
  4. Binder, R. V. Testing Object-Oriented Systems: Models, Patterns, and Tools. Addison-Wesley, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Blackburn, M, Busser, R., Nauman, A., Knickerbocker, R., and Kasuda, R. Mars Polar Lander fault identification using model-based testing. In Proc. of the Eighth International Conference on Engineering of Complex Computer Systems, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Chavez, C. and Lucena, C. A Metamodel for aspect-oriented modeling, The Workshop on Aspect-Oriented Modeling with UML, 2002.Google ScholarGoogle Scholar
  7. Coelho, W. and Murphy, G. C. ActiveAspect: Presenting crosscutting structure. ICSE First International Workshop on the Modeling and Analysis of Concerns in Software. 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Dalal, S. R., Jain, A., Karunanithi, N., Leaton, J. M., Lott, C. M., Patton, G. C., and Horowitz, B. M. Model-based testing in practice. In Proc. of the 21st International Conf. on Software Engineering (ICSE'99), 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. El-Far, I. K. and Whittaker, J. A. Model-based software testing. In Encyclopedia on Software Engineering (edited by Marciniak), Wiley, 2001.Google ScholarGoogle Scholar
  10. Elrad, T., Aldawud, O., and Bader, A. Expressing aspects using UML behavior and structural diagrams. In Aspect-Oriented Software Development (edited by Filman, R. E. et al.). Addison-Wesley, 2005.Google ScholarGoogle Scholar
  11. Gradecki, J. and Lesiecki, N. Mastering AspectJ: Aspect-Oriented Programming in Java. Wiley, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Groher, I. and Schulze, S. Generating aspect code from UML models. The Third International Workshop on Aspect-Oriented Modeling. 2003.Google ScholarGoogle Scholar
  13. Han, Y., Kniesel, G., and Cremers, A. B. A meta model and modeling notation for AspectJ, The 5th AOSD Modeling with UML Workshop, 2004.Google ScholarGoogle Scholar
  14. Kiczales, G., Hilsdale, E., Hugunin, J., Kersten, M., Palm, J. and Griswold, W. G., An overview of AspectJ. In Proc. of ECOOP'01, pp. 327--353, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Kiczales, G., Lamping, J., Mendhekar, A., Maeda, C., Lopes, C. V., Loingtier, J. M. and Irwin, J., Aspect-oriented programming. In Proc. of ECOOP'97, LNCS 1241, pp. 220--242, 1997.Google ScholarGoogle ScholarCross RefCross Ref
  16. McEachen, N. and Alexander, R. T. Distributing classes with woven concerns: an exploration of potential fault scenario. In Proc. of the Fourth International Conference on Aspect-Oriented Software Development (AOSD'05). pp. 192--200, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Mellor, S. J. A framework for aspect-oriented modeling. The 4th AOSD Modeling With UML Workshop, 2003.Google ScholarGoogle Scholar
  18. Meyer, B. Object-Oriented Software Construction. Englewood Cliffs, N.J.: Prentice-Hall, 1988. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Orleans, D. Incremental programming with extensible decisions, In Proceedings of the 1st International Conference on Aspect-Oriented Software Development, April 2002, The Netherlands. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Prenninger, W. and Pretschner, A. Abstractions for model-based testing. In Proc. of the 2nd Intl. Workshop on Test and Analysis of Component Based Systems (TACoS'04), Electronic Notes in Theoretical Computer Science 116:59--71, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Pretschner, A., Prenninger, W., Wagner, S., Kühnel, C., Baumgartner, M., Sostawa, B., Zölch, R., and Stauner, T. One evaluation of model-based testing and its automation. In Proc. of the 27th International Conf. on Software Engineering (ICSE'05), 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Pretschner, A., Slotosch, O., Aiglstorfer, E., and Kriebel, S. Model-based testing for real - The inhouse card case study. J. Software Tools for Technology Transfer 5(2-3):140--157, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Ray, I., France, R., Li, N., and Georg, G. An aspect-based approach to modeling access control concerns. Information and Software Technology, vol. 46, no.9, pp. 575--587, 2004.Google ScholarGoogle ScholarCross RefCross Ref
  24. Stein, D., Hanenberg, S., and Unland, R. An UML-based aspect-oriented design notation for AspectJ. In Proceedings of the First International Conference on Aspect-Oriented Software Development, pp. 106--112. ACM Press, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Tkatchenko, M. and Kiczales, G. Uniform support for modeling crosscutting structure. The 6th International Workshop on Aspect-Oriented Modeling (AOM'05). 2005.Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Xie, T., Zhao, J., Marinov, D., and Notkin, D. Automated test generation for AspectJ programs, AOSD 2005 Workshop on Testing Aspect-Oriented Programs, Chicago, 2005.Google ScholarGoogle Scholar
  27. Xu, D. Test generation from aspect-oriented state models. Technical Report, NDSU-CS-TR-XU02, North Dakota State University Department of Computer Science, Sept. 2005.Google ScholarGoogle Scholar
  28. Xu, D., Xu, W., and Nygard, K. A state-based approach to testing aspect-oriented programs. In Proc. of the 17th International Conference on Software Engineering and Knowledge Engineering (SEKE'05), July 14--16, Taiwan.Google ScholarGoogle Scholar
  29. Xu, W. and Xu, D. A model-based approach to test generation for aspect-oriented programs. AOSD 2005 Workshop on Testing Aspect-Oriented Programs, Chicago, March 2005.Google ScholarGoogle Scholar
  30. Zhao, J. and Rinard, M., System dependence graph construction for aspect-oriented programs, MIT-LCS-TR-891, Laboratory for Computer Science, MIT, 2003.Google ScholarGoogle Scholar
  31. Zhao, J. Data-flow-based unit testing of aspect-oriented programs, In Proc of the 27th Annual IEEE International Computer Software and Applications Conference (COMPSAC'03), pp. 188--197, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. Zhou, Y., Richardson, D., and Ziv, H. Towards a practical approach to test aspect-oriented software. In Proc. the 2004 Workshop on Testing Component-Based Systems (TECOS), Sept. 2004.Google ScholarGoogle Scholar

Index Terms

  1. State-based incremental testing of aspect-oriented programs

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in
    • 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

      Copyright © 2006 ACM

      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]

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 20 March 2006

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • Article

      Acceptance Rates

      Overall Acceptance Rate41of139submissions,29%

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader