Formal Test Generation from UML Models

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.

[1]  Nicolas Guelfi,et al.  CO-OPN/2: a concurrent object-oriented formalism , 1997 .

[2]  16th IEEE International Workshop on Rapid System Prototyping (RSP 2005), 8-10 June 2005, Montreal, Canada , 2005, IEEE International Workshop on Rapid System Prototyping.

[3]  Olivier Biberstein CO-OPN/2: An Object-Oriented Formalism for the Specification of Concurrent Systems , 1997 .

[4]  Levi Lucio,et al.  Prototyping Domain Specific Languages with COOPN , 2005, RISE.

[5]  Didier Buchs,et al.  Prototyping Object Oriented Specifications , 2003, ICATPN.

[6]  Octavian Patrascoiu YATL:Yet Another Transformation Language , 2004 .

[7]  Glenford J. Myers,et al.  Art of Software Testing , 1979 .

[8]  Wil M. P. van der Aalst,et al.  Applications and Theory of Petri Nets 2003 , 2003, Lecture Notes in Computer Science.

[9]  Alfred Strohmeier Fondue: An Object-Oriented Development Method based on the UML Notation , 2001 .

[10]  Alexander Pretschner,et al.  Model-Based Test Case Generation for Smart Cards , 2003, FMICS.

[11]  Cécile Péraire,et al.  A Theory of Specification-Based Testing for Object-Oriented Software , 1996, EDCC.

[12]  Levi Lucio,et al.  A Methodology and a Framework for Model-Based Testing , 2004, RISE.

[13]  Cécile Péraire,et al.  Test selection for object-oriented software based on formal specifications , 1998, PROCOMET.

[14]  Joaquin Miller,et al.  MDA Guide Version 1.0.1 , 2003 .

[15]  Nicolas Guelfi,et al.  A Formal Specification Framework for Object-Oriented Distributed Systems , 2000, IEEE Trans. Software Eng..

[16]  Matthew Hennessy,et al.  The Power of the Future Perfect in Program Logics , 1985, Inf. Control..

[17]  Sol M. Shatz,et al.  Mapping UML Diagrams to a Petri Net Notation for System Simulation , 2004, SEKE.

[18]  João Gabriel Silva,et al.  Dependable Computing — EDCC-2 , 1996, Lecture Notes in Computer Science.

[19]  Didier Buchs,et al.  A test selection language for CO-OPN specifications , 2005, 16th IEEE International Workshop on Rapid System Prototyping (RSP'05).

[20]  Bruno Legeard,et al.  Generation of functional test sequences from B formal specifications presentation and industrial case-study , 2001, Proceedings 16th Annual International Conference on Automated Software Engineering (ASE 2001).

[21]  Massimo Felici,et al.  Trust Strategies and Policies in Complex Socio-technical Safety-Critical Domains: An Analysis of the Air Traffic Management Domain , 2006, RISE.

[22]  Marie-Claude Gaudel,et al.  Software testing based on formal specifications: a theory and a tool , 1991, Softw. Eng. J..