Contract-Based Testing

A tester relies on some sort of contract between the users and the implementers of a system. The contract defines the obligations of each part that are partially checked by selecting and executing test-cases. In fact, these test-cases are contracts, too, although in a rather operational form. In this article we define the general relationship between these two forms of contract and present a method how various test-selection strategies can be defined formally. More precisely, we demonstrate how test-cases can be calculated from contracts using a refinement calculus.

[1]  Richard G. Hamlet,et al.  Testing Programs with the Aid of a Compiler , 1977, IEEE Transactions on Software Engineering.

[2]  Jan Tretmans,et al.  Testing Concurrent Systems: A Formal Approach , 1999, CONCUR.

[3]  S. Anderson,et al.  Secure Synthesis of Code: A Process Improvement Experiment , 1999, World Congress on Formal Methods.

[4]  Bernhard K. Aichernig Test-Case Calculation through Abstraction , 2001, FME.

[5]  Jeremy Dick,et al.  Automating the Generation and Sequencing of Test Cases from Model-Based Specifications , 1993, FME.

[6]  Philip Alan Stocks,et al.  Applying formal methods to software testing , 1993 .

[7]  Richard J. Lipton,et al.  Hints on Test Data Selection: Help for the Practicing Programmer , 1978, Computer.

[8]  Marie-Claude Gaudel,et al.  Testing Algebraic Data Types and Processes: A Unifying Theory , 1998, Formal Aspects of Computing.

[9]  Ralph-Johan Back,et al.  Reasoning About Interactive Systems , 1999, World Congress on Formal Methods.

[10]  Bernhard K. Aichernig,et al.  Test-Design through Abstraction - A Systematic Approach Based on the Refinement Calculus , 2001, J. Univers. Comput. Sci..

[11]  Jonathan P. Bowen,et al.  ZUM '95: The Z Formal Specification Notation , 1995, Lecture Notes in Computer Science.

[12]  Jim Woodcock,et al.  FME '93: Industrial-Strength Formal Methods , 1993, Lecture Notes in Computer Science.

[13]  Ralph-Johan Back,et al.  Refinement Calculus: A Systematic Introduction , 1998 .

[14]  Ralph-Johan Back Enforcing behavior with contracts , 2003 .

[15]  Tsong Yueh Chen,et al.  In black and white: an integrated approach to class-level testing of object-oriented programs , 1998, TSEM.

[16]  José Nuno Oliveira,et al.  FME 2001: Formal Methods for Increasing Software Productivity , 2001, Lecture Notes in Computer Science.

[17]  Bernhard K. Aichernig,et al.  Systematic Black-Box Testing of Computer-Based Systems through Formal Abstraction Techniques , 2001 .

[18]  Carroll Morgan,et al.  Programming from specifications , 1990, Prentice Hall International Series in computer science.

[19]  C. A. Petri,et al.  Concurrency Theory , 1986, Advances in Petri Nets.

[20]  Bernhard K. Aichernig The Commuting V-Diagram , 2003, CSL.

[21]  Thierry Jéron,et al.  An Experiment in Automatic Generation of Test Suites for Protocols with Verification Technology , 1997, Sci. Comput. Program..

[22]  Susan Stepney Testing as Abstraction , 1995, ZUM.

[23]  Bernhard K. Aichernig,et al.  Validating Voice Communication Requirements Using Lightweight Formal Methods , 2000, IEEE Softw..

[24]  Bernhard K. Aichernig Contract-based mutation testing in the refinement calculus , 2002, Electron. Notes Theor. Comput. Sci..

[25]  Boris Beizer,et al.  Software Testing Techniques , 1983 .

[26]  Claus Pahl,et al.  Interference Analysis for Dependable Systems Using Refinement and Abstraction , 2002, FME.

[27]  Boris Beizer,et al.  Software testing techniques (2. ed.) , 1990 .

[28]  Bruno Legeard,et al.  Automated Boundary Testing from Z and B , 2002, FME.

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

[30]  Hélène Waeselynck,et al.  Test Criteria Definition for B Models , 1999, World Congress on Formal Methods.

[31]  Peter A. Lindsay,et al.  FME 2002:Formal Methods—Getting IT Right , 2002, Lecture Notes in Computer Science.

[32]  Ralph Back Verification and Refinement of Action Contracts , 2000 .

[33]  Bernhard K. Aichernig,et al.  Formal specification techniques as a catalyst in validation , 2000, Proceedings. Fifth IEEE International Symposium on High Assurance Systems Engineering (HASE 2000).