Towards model-driven unit testing

The Model-Driven Architecture (MDA) approach for constructing software systems advocates a stepwise refinement and transformation process starting from high-level models to concrete program code. In contrast to numerous research efforts that try to generate executable function code from models, we propose a novel approach termed model-driven monitoring. On the model level the behavior of an operation is specified with a pair of UML composite structure diagrams (visual contract), a visual notation for pre- and post-conditions. The specified behavior is implemented by a programmer manually. An automatic translation from our visual contracts to JML assertions allows for monitoring the hand-coded programs during their execution. In this paper we present how we extend our approach to allow for model-driven unit testing, where we utilize the generated JML assertions as test oracles. Further, we present an idea how to generate sufficient test cases from our visual contracts with the help of model-checking techniques.

[1]  Boris Magnusson,et al.  ECOOP 2002 — Object-Oriented Programming , 2002, Lecture Notes in Computer Science.

[2]  Ilinca Ciupa,et al.  Automatic Testing Based on Design by Contract TM , 2005 .

[3]  K. Beck,et al.  Extreme Programming Explained , 2002 .

[4]  Claude Caci,et al.  Testing object-oriented systems , 2000, SOEN.

[5]  Reiko Heckel,et al.  Towards Contract-based Testing of Web Services , 2005, Electron. Notes Theor. Comput. Sci..

[6]  David Lorge Parnas,et al.  Using Test Oracles Generated from Program Documentation , 1998, IEEE Trans. Software Eng..

[7]  Arend Rensink The GROOVE Simulator: A Tool for State Space Generation , 2003, AGTIVE.

[8]  Robert V. Binder,et al.  Testing Object-Oriented Systems: Models, Patterns, and Tools , 1999 .

[9]  Ivar Jacobson,et al.  The Unified Software Development Process , 1999 .

[10]  Sarfraz Khurshid,et al.  Korat: automated testing based on Java predicates , 2002, ISSTA '02.

[11]  Alan Hartman,et al.  The AGEDIS tools for model based testing , 2004, ISSTA '04.

[12]  Thomas O. Meservy,et al.  Transforming software development: an MDA road map , 2005, Computer.

[13]  Kent L. Beck,et al.  Extreme programming explained - embrace change , 1990 .

[14]  Gary T. Leavens,et al.  Design by Contract with JML , 2006 .

[15]  Albert Zündorf,et al.  Graph Pattern Matching in PROGRES , 1994, TAGT.

[16]  Reiko Heckel,et al.  Model-driven development of reactive information systems: from graph transformation rules to JML contracts , 2007, International Journal on Software Tools for Technology Transfer.

[17]  Gregor Engels,et al.  Model-driven Monitoring: Generating Assertions from Visual Contracts , 2006, 21st IEEE/ACM International Conference on Automated Software Engineering (ASE'06).

[18]  Reiko Heckel,et al.  Model-Driven Monitoring: An Application of Graph Transformation for Design by Contract , 2006, ICGT.

[19]  Reiko Heckel,et al.  Towards Model-Driven Testing , 2003, TACoS.

[20]  Richard G. Hamlet,et al.  Automatically Checking an Implementation against Its Formal Specification , 2000, IEEE Trans. Software Eng..

[21]  James A. Whittaker,et al.  Model‐Based Software Testing , 2002 .

[22]  Bertrand Meyer,et al.  Applying 'design by contract' , 1992, Computer.

[23]  Reiko Heckel,et al.  Double-Pullback Transitions and Coalgebraic Loose Semantics for Graph Transformation Systems , 2001, Appl. Categorical Struct..

[24]  Gregor Engels,et al.  Executable visual contracts , 2005, 2005 IEEE Symposium on Visual Languages and Human-Centric Computing (VL/HCC'05).

[25]  Dániel Varró,et al.  Model Checking Graph Transformations: A Comparison of Two Approaches , 2004, ICGT.

[26]  John J. Marciniak,et al.  Encyclopedia of Software Engineering , 1994, Encyclopedia of Software Engineering.

[27]  Gary T. Leavens,et al.  A Simple and Practical Approach to Unit Testing: The JML and JUnit Way , 2002, ECOOP.

[28]  MeyerBertrand,et al.  Design by Contract , 1997 .

[29]  Reiko Heckel,et al.  Automatic Conformance Testing of Web Services , 2005, FASE.

[30]  Reiko Heckel,et al.  Graph Grammars with Negative Application Conditions , 1996, Fundam. Informaticae.

[31]  Kent L. Beck,et al.  Test-driven Development - by example , 2002, The Addison-Wesley signature series.

[32]  Manfred Nagl,et al.  Applications of Graph Transformations with Industrial Relevance , 2004, Lecture Notes in Computer Science.