Test Generation with Abstraction and Concretization Jens R. Calamé Natalia Ioustinova Jaco van de Pol
Our Approach in Context with MDA Abstraction and test generation from platform independent models Starting point: UML-Model Formalization and abstraction of the specification before test generation Generation of parameterizable test cases on a platform-independent level Generation of Rules for Data Selection PIM PIT PSM PST Code TestCode 21-06-2005 1st Dutch Workshop on Formal Testing Techniques
Our Test Generation Process System Specification (informal) PIM PIT System Specification (formal) Abstraction Abstract System Specification Test Case Generation Test Purpose TGV Abstract Test Case TTCN-3 Generation Constraint Generation Parameterizable Test Case (TTCN-3) Rule System for Data Selection 21-06-2005 1st Dutch Workshop on Formal Testing Techniques
1st Dutch Workshop on Formal Testing Techniques Abstraction Motivation: Test Generation with TGV is based on enumerative techniques Given: formal specification with infinite state-space w.r.t. input data Result: formal specification with finite state-space w.r.t. input data System abstraction on specification-level: Replace all input values by one constant chaos (*) Propagate this * through the system Transform conditions based on * to nondeterministic choice Abstracted system is an over-approximation of original system 21-06-2005 1st Dutch Workshop on Formal Testing Techniques
Implementation of Abstraction Program transformation of a µCRL process specification: For each datatype D add one additional type D* with the constructor *D and a lifting function :DD* For all datatypes D realize all functions additionally for D* and lift them (strict lifting, except for datatype Boolean) Lift all action and process parameters Replace all input variables in the process definition by * (propagation of * happens automatically) and lift conditions In the process initialization use original values, lifted by , or use * 21-06-2005 1st Dutch Workshop on Formal Testing Techniques
Our Test Generation Process System Specification (informal) System Specification (formal) Abstraction Abstract System Specification Test Case Generation Test Purpose TGV Abstract Test Case TTCN-3 Generation Constraint Generation Parameterizable Test Case (TTCN-3) Rule System for Data Selection 21-06-2005 1st Dutch Workshop on Formal Testing Techniques
Test Case Generation with TGV TGV: Test Generation with Verification Technology Part of CADP toolkit Link between µCRL toolkit and CADP toolkit Test Generation with TGV Based on a labeled transition system (enumeration of all data values) Guided by a test purpose (focus of generated test cases) 21-06-2005 1st Dutch Workshop on Formal Testing Techniques
Our Test Generation Process System Specification (informal) System Specification (formal) Abstraction Abstract System Specification Test Case Generation Test Purpose TGV Abstract Test Case TTCN-3 Generation Constraint Generation Parameterizable Test Case (TTCN-3) Rule System for Data Selection 21-06-2005 1st Dutch Workshop on Formal Testing Techniques
Generation of Data Selection Rules Given: Abstract test case (control flow information + internal data) Original specification (data dependencies) Result: (generated Prolog implementation) Rules, representing ADT functions of the original specification (meta language) Rule system based on specification: one rule for each transition in original system, containing Conditions Assignments (internally or from input actions, resp.) Test oracle based on abstract test case (query to rule system) Invocation of all selected actions as a conjunction 21-06-2005 1st Dutch Workshop on Formal Testing Techniques
1st Dutch Workshop on Formal Testing Techniques Case Study CEPS Common Electronic Purse Specifications Standard for electronic payment cards and infrastructure Appropriate to experimenting with our approach due to its data orientation Experience with CEPS (card application) Abstracted system of a challenging size (17.5 mio. transitions and 3 mio. states) Size could be reduced further with unused variable analysis and LTS minimization (5487 transitions and 1627 states) From the resulting system, test cases and data constraints could be generated easily 21-06-2005 1st Dutch Workshop on Formal Testing Techniques
Conclusion and Future Work *-Abstraction algorithm is implemented for µCRL TGV is applied on abstracted systems Parameterization constraint generation is defined and implemented The whole test generation process is applied to the CEPS case study Future work Generation of parameterizable TTCN-3 test cases Formalization of UML-Models for test generation Comparison of STG to our approach (First release of STG: Oct. 2005) 21-06-2005 1st Dutch Workshop on Formal Testing Techniques