Abstract
Der Artikel untersucht, wie Probleme, die speziell beim Unit-Testen objektorientierter Programme auftreten, mit Hilfe des Paradigmas aspektorientierte Programmierung gelöst werden können.
Die Untersuchung stellt Schritt für Schritt die einzelnen Teilprobleme vor, f"uhrt konventionelle Lösungen auf, zeigt aspektorientierte Alternativen für die gestellten Probleme und erl"autert anhand von Code-Beispielen ihre Implementierung in der Sprache AspectJ.
Die Untersuchung begleitend wird das Testframework FlexTest vorgestellt, das die praktische Umsetzbarkeit der vorgestellten Ideen demonstriert.
Abstract
The article examines whether problems that occur specifically during unit testing of object-oriented programs can be solved using the aspect-oriented programming paradigm.
It presents the various subproblems step by step, shows conventional solutions, describes aspect-oriented solutions to the problems in a general and language-independent manner, and concludes by looking at the aspect-oriented implementation in the language AspectJ.
Parallel to this, we present the test framework FlexTest, which demonstrates the practical implementability of our ideas.
Similar content being viewed by others
Literatur
AspectJ-Homepage (2004) htpp://www.aspectj.org
Beck K, Gamma E (2004) Test Infected: Programmers Love Writing Test. http://members.pingnet.ch/gamma/html/junit.htm
Binder RV (1994) Object-oriented software testing. Communications of the ACM 37(9):28–29
Binder RV (2000) Testing Object-Oriented Systems. Object Technology Series. Addison-Wesley
BOOST-Testframework-Homepage (2004) http://www.boost.org
Briand LC, Dzidek W, Labiche Y (2004) Using Aspect-Oriented Programming to Instrument OCL Contracts in Java. Technical report, Carlton University, Kanada
Bruel J-M, Araújo J, Moreira A, Royer A (2003) Using Aspects to Develop Built-In Tests for Components. In: AOSD Modeling with UML Workshop, 6th International Conference on the Unified Modeling Language (UML), San Francisco, USA
Deters M, Cytron RK (2001) Introduction of Program Instrumentation using Aspects. In: Workshop of Advanced Separation of Concerns in Object-Oriented Systems, 16th Conference on Object-Oriented Programming Systems, Languages, and Applications (OOPSLA), ACM Sigplan Notices, Tampa, USA
Filman RE, Friedman DP (2000) Aspect-Oriented Programming is Quantification and Obliviousness. In: Workshop on Advanced Separation of Concerns, 19th Annual ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), Minneapolis, USA
Filman RE, Havelund K (2002) Source-Code Instrumentation and Quantification of Events. In: Workshop on Foundations of Aspect-Oriented Languages, 1st International Conference on Aspect-Oriented Software Development (AOSD), Enschede, Niederlande
Jeffries RE (1999) Extreme Testing: Why Aggressive Software Development Calls for Radical Testing Efforts. Software Testing & Quality Engineering
JUnit-homepage (2004) http://www.junit.org
Kiczales G, Hilsdale E, Hugunin J, Kersten M, Palm J, Griswold WG (2001) An Overview of AspectJ. In: Proceedings of the 15th European Conference on Object-Oriented Programming (ECOOP), Budapest, Ungarn. Lecture Notes in Computer Science, vol 2072. Springer-Verlag
Kiczales G, Lamping J, Mendhekar A, Maeda C, Videira Lopes C, Loingtier J-M, Irwin J (1997) Aspect-Oriented Programming. In: Proceedings of the 11th European Conference on Object-Oriented Programming (ECOOP), Jyväskylä, Finnland, Lecture Notes in Computer Science, vol 1241. Springer-Verlag
Laddad R (2003) AspectJ in Action: Practical Aspect-Oriented Programming. Manning Publications
Lesiecki N (2004) Test Flexibility with AspectJ and Mock Objects. http://www-106.ibm.com/developerworks/java/library/j-aspectj2/
Liggesmeyer P (1995) Ein Überblick über objektorientiertes Testen. In: 8. Treffen des Arbeitskreises ’Testen, Analysieren und Verifizieren von Software’ (TAV), Hamburg. Softwaretechnik-Trends, vol 15. Gesellschaft für Informatik (GI)
Liggesmeyer P, Spillner A (eds) (2000) Themenheft: Aktuelle Entwicklungen im Softwaretest. Informatik Forschung und Entwicklung 15. Springer-Verlag, September 2000
Liskov B (1987) Data Abstraction and Hierarchy. In: Addendum to the proceedings on Object-oriented programming systems, languages and applications, Orlando, USA, pp 17–34
Low T (2002) Designing, Modelling and Implementing a Toolkit for Aspect-oriented Tracing (TAST). In: Workshop on Aspect-Oriented Modeling with UML, 1st International Conference on Aspect-Oriented Software Development (AOSD), Enschede, Niederlande
Mahrenholz D, Spinczyk O, Schröder-Preikschat W (2002) Program Instrumentation for Debugging and Monitoring with AspectC++. In: Proceedings of The 5th IEEE International Symposium on Object-oriented Real-time Distributed Computing (ISORC), Crystal City, USA
Meyer B (1997) Object-Oriented Software Construction. Prentice Hall, 2nd edition
MockObjects.com (2004) http://www.mockobjects.com.
Overbeck J (1993) Testing Object-Oriented Software: State of the Art and Research Directions. In: 1st European International Conference on Software Testing, Analysis and Review (EuroStar), London, Großbritannien
Richters M, Gogolla M (2003) Aspect-Oriented Monitoring of UML and OCL Constraints. In: AOSD Modeling With UML Workshop, 6th International Conference on the Unified Modeling Language (UML), San Francisco, USA
Sokenou D, Herrmann S (2004) Using Object Teams for State-Based Class Testing. Technical report, Technische Universität Berlin, Fakultät IV – Elektrotechnik und Informatik
Turner CD, Robson DJ (1992) The Testing of Object-Oriented Programs. Technical report, University of Durham, Department of Computer Science
Vösgen M (2004) Implementierung eines aspektorientierten Frameworks für den objektorientierten Unit-Test. Master’s thesis, Technische Universität Berlin
Xu G, Yang Z, Huang H (2004) A Basic Model for Aspect-Oriented Uni Testing. www.cs.ecnu.edu.cn/sel/ harryxu/research/ papers/fates04_aspect-oriented
Zhao J (2003) Unit Testing for Aspect-Oriented Programs. Technical Report SE-141-6, Information Processing Society of Japan (IPSJ)
Author information
Authors and Affiliations
Corresponding author
Additional information
CR Subject Classification
D.2.5
Rights and permissions
About this article
Cite this article
Vösgen, M., Sokenou, D. Aspektorientierte Programmiertechniken im Unit-Testen. Informatik Forsch. Entw. 20, 57–71 (2005). https://doi.org/10.1007/s00450-005-0192-x
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00450-005-0192-x