Springer Nature is making SARS-CoV-2 and COVID-19 research free. View research | View latest news | Sign up for updates

Aspektorientierte Programmiertechniken im Unit-Testen

  • 152 Accesses

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.

This is a preview of subscription content, log in to check access.

Literatur

  1. 1.

    AspectJ-Homepage (2004) htpp://www.aspectj.org

  2. 2.

    Beck K, Gamma E (2004) Test Infected: Programmers Love Writing Test. http://members.pingnet.ch/gamma/html/junit.htm

  3. 3.

    Binder RV (1994) Object-oriented software testing. Communications of the ACM 37(9):28–29

  4. 4.

    Binder RV (2000) Testing Object-Oriented Systems. Object Technology Series. Addison-Wesley

  5. 5.

    BOOST-Testframework-Homepage (2004) http://www.boost.org

  6. 6.

    Briand LC, Dzidek W, Labiche Y (2004) Using Aspect-Oriented Programming to Instrument OCL Contracts in Java. Technical report, Carlton University, Kanada

  7. 7.

    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

  8. 8.

    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

  9. 9.

    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

  10. 10.

    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

  11. 11.

    Jeffries RE (1999) Extreme Testing: Why Aggressive Software Development Calls for Radical Testing Efforts. Software Testing & Quality Engineering

  12. 12.

    JUnit-homepage (2004) http://www.junit.org

  13. 13.

    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

  14. 14.

    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

  15. 15.

    Laddad R (2003) AspectJ in Action: Practical Aspect-Oriented Programming. Manning Publications

  16. 16.

    Lesiecki N (2004) Test Flexibility with AspectJ and Mock Objects. http://www-106.ibm.com/developerworks/java/library/j-aspectj2/

  17. 17.

    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)

  18. 18.

    Liggesmeyer P, Spillner A (eds) (2000) Themenheft: Aktuelle Entwicklungen im Softwaretest. Informatik Forschung und Entwicklung 15. Springer-Verlag, September 2000

  19. 19.

    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

  20. 20.

    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

  21. 21.

    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

  22. 22.

    Meyer B (1997) Object-Oriented Software Construction. Prentice Hall, 2nd edition

  23. 23.

    MockObjects.com (2004) http://www.mockobjects.com.

  24. 24.

    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

  25. 25.

    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

  26. 26.

    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

  27. 27.

    Turner CD, Robson DJ (1992) The Testing of Object-Oriented Programs. Technical report, University of Durham, Department of Computer Science

  28. 28.

    Vösgen M (2004) Implementierung eines aspektorientierten Frameworks für den objektorientierten Unit-Test. Master’s thesis, Technische Universität Berlin

  29. 29.

    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

  30. 30.

    Zhao J (2003) Unit Testing for Aspect-Oriented Programs. Technical Report SE-141-6, Information Processing Society of Japan (IPSJ)

Download references

Author information

Correspondence to Matthias Vösgen.

Additional information

CR Subject Classification

D.2.5

Rights and permissions

Reprints 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

Download citation

Keywords

  • Testing
  • Aspect-oriented programming