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.
- Aldawud, O., Bader, F., and Elrad, T. Weaving with Statecharts. The Second International Workshop on Aspect Oriented Modeling. 2002.Google Scholar
- Aldawud, T. and Bader, A. UML profile for aspect-oriented software development, The Third International Workshop on Aspect Oriented Modeling, 2003.Google Scholar
- 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 Scholar
- Binder, R. V. Testing Object-Oriented Systems: Models, Patterns, and Tools. Addison-Wesley, 2000. Google ScholarDigital Library
- 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 ScholarDigital Library
- Chavez, C. and Lucena, C. A Metamodel for aspect-oriented modeling, The Workshop on Aspect-Oriented Modeling with UML, 2002.Google Scholar
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- El-Far, I. K. and Whittaker, J. A. Model-based software testing. In Encyclopedia on Software Engineering (edited by Marciniak), Wiley, 2001.Google Scholar
- 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 Scholar
- Gradecki, J. and Lesiecki, N. Mastering AspectJ: Aspect-Oriented Programming in Java. Wiley, 2003. Google ScholarDigital Library
- Groher, I. and Schulze, S. Generating aspect code from UML models. The Third International Workshop on Aspect-Oriented Modeling. 2003.Google Scholar
- 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 Scholar
- 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 ScholarDigital Library
- 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 ScholarCross Ref
- 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 ScholarDigital Library
- Mellor, S. J. A framework for aspect-oriented modeling. The 4th AOSD Modeling With UML Workshop, 2003.Google Scholar
- Meyer, B. Object-Oriented Software Construction. Englewood Cliffs, N.J.: Prentice-Hall, 1988. Google ScholarDigital Library
- Orleans, D. Incremental programming with extensible decisions, In Proceedings of the 1st International Conference on Aspect-Oriented Software Development, April 2002, The Netherlands. Google ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarCross Ref
- 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 ScholarDigital Library
- Tkatchenko, M. and Kiczales, G. Uniform support for modeling crosscutting structure. The 6th International Workshop on Aspect-Oriented Modeling (AOM'05). 2005.Google ScholarDigital Library
- 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 Scholar
- 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 Scholar
- 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 Scholar
- 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 Scholar
- Zhao, J. and Rinard, M., System dependence graph construction for aspect-oriented programs, MIT-LCS-TR-891, Laboratory for Computer Science, MIT, 2003.Google Scholar
- 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 ScholarDigital Library
- 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 Scholar
Index Terms
- State-based incremental testing of aspect-oriented programs
Recommendations
State-based testing of integration aspects
WTAOP '06: Proceedings of the 2nd workshop on Testing aspect-oriented programsAspect-oriented programming supports a variety of composition strategies, from the clearly acceptable to the questionable. One of the strategies is to make an aspect integrate separate concerns. Such integration aspects, like other aspects, may ...
Prioritizing State-Based Aspect Tests
ICST '10: Proceedings of the 2010 Third International Conference on Software Testing, Verification and ValidationIn aspect-oriented programming, aspects are essentially incremental modifications to their base classes. Therefore aspect-oriented programs can be tested in an incremental fashion – we can first test the base classes and then test the base classes and ...
Testing aspect-oriented programs with finite state machines
Aspect-oriented programming yields new types of programming faults due to the introduction of new constructs for dealing with crosscutting concerns. To reveal aspect faults, this paper presents a framework for testing whether or not aspect-oriented ...
Comments