Formal Test Generation from UML Models

  • Didier Buchs
  • Luis Pedro
  • Levi Lúcio
Part of the Lecture Notes in Computer Science book series (LNCS, volume 4028)


In this paper we will explain our approach for generating test cases for a UML system model. Despite the fact that UML authors claim that UML semantics are precise enough to define non-ambiguous models, we find that the overlap of the different views makes it difficult to explore and make deductions on the state space of the modeled system in order to generate test cases. Our approach is thus based on a subset of UML (inspired from the Fondue approach) for which we have defined clear transformation semantics. We provide these semantics by delineating transformation rules using the MDA (Model Driven Architecture) architecture. We transform UML models into CO-OPN (Concurrent Object Oriented Petri Nets) ones, CO-OPN being a formal specification language defined in our Laboratory.

We have also defined a language for expressing test intentions for CO-OPN models. This language allows selecting interesting executions (tests cases) of a model by providing constraints over all possible traces of that model. By exploring the model’s semantics with the tools we have built for our CO-OPN language we are able to generate test cases based on those test intentions. We are also able to partially eliminate redundancy in the produced test cases by finding equivalence classes in the model operation’s inputs.


Abstract Syntax System Under Test Generate Test Case Object Management Group Test Driver 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Strohmeier, A.: Fondue: An Object-Oriented Development Method based on the UML Notation. In: X Jornada Técnica de Ada-Spain, Documentación, ETSI de Telecommunicación, Universidad Politécnica de Madrid, Spain, Madrid (November 2001)Google Scholar
  2. 2.
    Buchs, D., Guelfi, N.: A formal specification framework for object-oriented distributed systems. IEEE Transactions on Software Engineering 26(7), 635–652 (2000)CrossRefGoogle Scholar
  3. 3.
    Biberstein, O., Buchs, D., Guelfi, N.: CO-OPN/2: A concurrent object-oriented formalism. In: Proc. Second IFIP Conf. on Formal Methods for Open Object-Based Distributed Systems (FMOODS), Canterbury, UK, July 21-23, 1997, pp. 57–72. Chapman and Hall, Lo, Boca Raton (1997)Google Scholar
  4. 4.
    Biberstein, O.: CO-OPN/2: An Object-Oriented Formalism for the Specification of Concurrent Systems. PhD thesis, University of Geneva (1997)Google Scholar
  5. 5.
    Object Management Group. Mda guide version 1.0.1. Technical report, OMG (June 2003)Google Scholar
  6. 6.
    Patrascoiu, O.: YATL:Yet Another Transformation Language. In: Proceedings of the 1st European MDA Workshop, MDA-IA, pp. 83–90. University of Twente, the Nederlands (2004)Google Scholar
  7. 7.
    Triskell team. MTL Documentation, URL:
  8. 8.
    Hu, Z., Shatz, S.M.: Mapping uml diagrams to a petri net notation for system simulation. In: Maurer, F., Ruhe, G. (eds.) SEKE, pp. 213–219 (2004)Google Scholar
  9. 9.
    Triskell team. Mod-Transf - xml and ruled based transformation language, URL:
  10. 10.
    Object Management Group. Meta-Object Facility specification (April 2002), url:
  11. 11.
    Pedro, L.M., Lucio, L., Buchs, D.: Prototyping Domain Specific Languages with COOPN. In: Guelfi, N., Savidis, A. (eds.) RISE 2005. LNCS, vol. 3943, pp. 174–189. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  12. 12.
    Gaudel, M.-C., Bernot, G., Marre, B.: Software testing based on formal specifications: a theory and a tool. IEEE Software Engineering Journal 6(6), 387–405 (1991)Google Scholar
  13. 13.
    Myers, G.J.: The Art of Software Testing. John Wiley & Sons, Inc., New York (1979)Google Scholar
  14. 14.
    Péraire, C., Barbey, S., Buchs, D.: Test selection for object-oriented software based on formal specifications. In: PROCOMET 1998: Proceedings of the IFIP TC2/WG2.2,2.3 International Conference on Programming Concepts and Methods, London, UK, pp. 385–403. Chapman & Hall, Ltd, Boca Raton (1998)Google Scholar
  15. 15.
    Barbey, S., Buchs, D., Péraire, C.: A theory of specification-based testing for object-oriented software. In: Hlawiczka, A., Simoncini, L., Silva, J.G.S. (eds.) EDCC 1996. LNCS, vol. 1150, pp. 303–320. Springer, Heidelberg (1996)Google Scholar
  16. 16.
    Lucio, L., Pedro, L.M., Buchs, D.: A Methodology and a Framework for Model-Based Testing. In: Guelfi, N. (ed.) RISE 2004. LNCS, vol. 3475, pp. 57–70. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  17. 17.
    Gamma, E., Beck, K.: URL:
  18. 18.
    Hennessy, M., Stirling, C.: The power of the future perfect in program logics. Inf. Control 67(1-3), 23–52 (1986)CrossRefMathSciNetGoogle Scholar
  19. 19.
    Lucio, L., Pedro, L., Buchs, D.: A test selection language for co-opn specifications. In: IEEE International Workshop on Rapid System Prototyping, pp. 195–201 (2005)Google Scholar
  20. 20.
    Al-Shabibi, A., Buchs, D., Buffo, M., Chachkov, S., Chen, A., Hurzeler, D.: Prototyping object oriented specifications. In: van der Aalst, W.M.P., Best, E. (eds.) ICATPN 2003. LNCS, vol. 2679, pp. 473–482. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  21. 21.
    Buffo, M., Buchs, D.: Symbolic simulation of coordinated algebraic petri nets using logic programming. University of Geneva – Internal NoteGoogle Scholar
  22. 22.
    Legeard, B., Peureux, F.: Generation of functional test sequences from b formal specifications-presentation and industrial case study. In: ASE, pp. 377–381 (2001)Google Scholar
  23. 23.
    Philipps, J., Pretschner, A., Slotosch, O., Aiglstorfer, E., Kriebel, S., Scholl, K.: Model-based test case generation for smart cards. Electr. Notes Theor. Comput. Sci., 80 (2003)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2006

Authors and Affiliations

  • Didier Buchs
    • 1
  • Luis Pedro
    • 1
  • Levi Lúcio
    • 1
  1. 1.Software Modeling and Verification laboratoryUniversity of GenevaSwitzerland

Personalised recommendations