Instantiation of Parameterized Data Structures for Model-Based Testing

Model-based testing is bound, by essence, to use the enumerated data structures of the system under test (SUT). On the other hand, formal modeling often involves the use of parameterized data structures in order to be more general (such a model should be sufficient to test many implementation variants) and to abstract irrelevant details. Consequently, the validation engineer is sooner or later required to instantiate these parameters. At the current time, this instantiation activity is a matter of experience and knowledge of the SUT. This work investigates how to rationalize the instantiation of the model parameters. It is obvious that a poor instantiation may badly influence the quality of the resulting tests. However, recent results in instantiation-based theorem proving and their application to software verification show that it is often possible to guess the smallest most general data enumeration. We first provide a formal characterization of what a most general instantiation is, in the framework of functional testing. Then, we propose an approach to automate the instantiation of the model parameters, which leaves the specifier and the validation engineer free to use the desired level of abstraction, during the model design process, without having to satisfy any finiteness requirement. We investigate cases where delaying the instantiation is not a problem. This work is illustrated by a realistic running example. It is presented in the framework of the BZ-Testing-Tools methodology, which uses a B abstract machine for model-based testing and targets many implementation languages.

[1]  Rajeev Alur,et al.  A Temporal Logic of Nested Calls and Returns , 2004, TACAS.

[2]  Michael J. Butler,et al.  ProB: A Model Checker for B , 2003, FME.

[3]  Bruno Legeard,et al.  Generation of test sequences from formal specifications: GSM 11‐11 standard case study , 2004, Softw. Pract. Exp..

[4]  Jean-François Couchot,et al.  Scalable Automated Proving and Debugging of Set-Based Specifications , 2003, J. Braz. Comput. Soc..

[5]  Stefania Gnesi,et al.  FME 2003: Formal Methods: International Symposium of Formal Methods Europe, Pisa, Italy, September 8-14, 2003. Proceedings , 2003, Lecture Notes in Computer Science.

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

[7]  Fabrice Bouquet,et al.  BZ-testing-tools: A tool-set for test generation from Z and B using constraint logic programming , 2002 .

[8]  Silvio Ranise,et al.  Applying Light-Weight Theorem Proving to Debugging and Verifying Pointer Programs , 2003, FTP.

[9]  Shaoying Liu,et al.  Criteria for generating specification-based tests , 1999, Proceedings Fifth IEEE International Conference on Engineering of Complex Computer Systems (ICECCS'99) (Cat. No.PR00434).

[10]  Pascal Fontaine,et al.  Decidability of Invariant Validation for Paramaterized Systems , 2003, TACAS.

[11]  Fabrice Bouquet,et al.  CLPS–B – A constraint solver to animate a B specification , 2004, International Journal on Software Tools for Technology Transfer.

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