Trace-Based Code Generation for Model-Based Testing

Paper Submitted for review at the Eighth International Conference on Generative Programming and Component Engineering. Model-based testing can be a powerful means to generate test cases for the system under test. However, creating a useful model for model-based testing requires expertise in the (formal) modeling language of the used tool and the general concept of modeling the system under test for effective test generation. A commonly used modeling notation is to describe the model through an existing programming language. This paper presents a technique to automatically generate an initial model describing the system from execution traces, using a common programming language notation. Turning this initial model into a full model to be used for model-based testing of the system under test then requires minimal effort compared to writing a model from scratch. This is illustrated by a case study application to a software component, which revealed real faults in its implementation.

[1]  David Notkin,et al.  Tool-assisted unit-test generation and selection based on operational abstractions , 2006, Automated Software Engineering.

[2]  Boudewijn F. van Dongen,et al.  Process mining: a two-step approach to balance between underfitting and overfitting , 2008, Software & Systems Modeling.

[3]  Phil McMinn,et al.  Search‐based software test data generation: a survey , 2004, Softw. Test. Verification Reliab..

[4]  Arie van Deursen,et al.  A Systematic Survey of Program Comprehension through Dynamic Analysis , 2008, IEEE Transactions on Software Engineering.

[5]  Arie van Deursen,et al.  Invariant-based automatic testing of AJAX user interfaces , 2009, 2009 IEEE 31st International Conference on Software Engineering.

[6]  Boudewijn F. van Dongen,et al.  ProM 4.0: Comprehensive Support for Real Process Analysis , 2007, ICATPN.

[7]  Leonardo Mariani,et al.  Automatic generation of software behavioral models , 2008, 2008 ACM/IEEE 30th International Conference on Software Engineering.

[8]  Hans-Gerhard Groß,et al.  Component-based software testing with UML , 2004 .

[9]  Thierry Coupaye,et al.  The FRACTAL component model and its support in Java , 2006, Softw. Pract. Exp..

[10]  Nikolai Tillmann,et al.  Mock-object generation with behavior , 2006, 21st IEEE/ACM International Conference on Automated Software Engineering (ASE'06).

[11]  Paola Inverardi,et al.  Towards Anti-Model-based Testing , 2004 .

[12]  Madeline Diep,et al.  Profiling deployed software: assessing strategies and testing opportunities , 2005, IEEE Transactions on Software Engineering.

[13]  Steve Freeman,et al.  Endo-testing: unit testing with mock objects , 2001 .

[14]  Stephen McCamant,et al.  The Daikon system for dynamic detection of likely invariants , 2007, Sci. Comput. Program..

[15]  Michael D. Ernst,et al.  Eclat: Automatic Generation and Classification of Test Inputs , 2005, ECOOP.

[16]  Alexander Pretschner,et al.  One evaluation of model-based testing and its automation , 2005, ICSE.

[17]  Marat Boshernitsan,et al.  From daikon to agitator: lessons and challenges in building a commercial tool for developer testing , 2006, ISSTA '06.

[18]  Francesca Lonetti,et al.  Let The Puppets Move! Automated Testbed Generation for Service-oriented Mobile Applications , 2008, 2008 34th Euromicro Conference Software Engineering and Advanced Applications.

[19]  Michael D. Ernst,et al.  Automatic test factoring for java , 2005, ASE '05.