Investigating the use of analysis contracts to support fault isolation in object oriented code

A number of activities involved in testing software are known to be difficult and time consuming. Among them is the isolation of faults once failures have been detected. In this paper, we investigate how the instrumentation of contracts could address this issue. Contracts are known to be a useful technique to specify the precondition and postcondition of operations and class invariants, thus making the definition of object-oriented analysis or design elements more precise. Our aim in this paper is to reuse and instrument contracts to ease testing. A thorough case study is run where we define contracts, instrument them using a commercial tool, and assess the benefits and limitations of doing so to support the isolation of faults. We then draw practical conclusions regarding the applicability of the approach and its limitations.

[1]  Marc J. Balcer,et al.  The category-partition method for specifying and generating fuctional tests , 1988, CACM.

[2]  Anneke Kleppe,et al.  The object constraint language: precise modeling with UML , 1998 .

[3]  J. A. McDermid,et al.  Investigating the Effectiveness of Object-Oriented Testing Strategies with the Mutation MethodSun-Woo Kim, John A. Clark *, John A. McDermid , 2001 .

[4]  Chris Dollin,et al.  Object-oriented development: the fusion method , 1994 .

[5]  John A. Clark,et al.  Investigating the effectiveness of object‐oriented testing strategies using the mutation method , 2001 .

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

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

[8]  K. N. King,et al.  A fortran language system for mutation‐based software testing , 1991, Softw. Pract. Exp..

[9]  Pascale Thévenod-Fosse,et al.  An empirical evaluation of statistical testing designed from UML state diagrams: the flight guidance system case study , 2001, Proceedings 12th International Symposium on Software Reliability Engineering.

[10]  Hong Sun,et al.  Investigating the use of analysis contracts to improve the testability of object‐oriented code , 2003, Softw. Pract. Exp..

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

[12]  Jean-Marc Jézéquel,et al.  Reliable Objects : Lightweight Testing for OO Languages , 2001 .

[13]  Jean-Marc Jézéquel,et al.  Robustness and diagnosability of OO systems designed by contracts , 2001, Proceedings Seventh International Software Metrics Symposium.

[14]  John A. Clark,et al.  Class Mutation : Mutation Testing for Object-Oriented Programs , 2000 .

[15]  Jean-Marc Jézéquel,et al.  Building trust into OO components using a genetic analogy , 2000, Proceedings 11th International Symposium on Software Reliability Engineering. ISSRE 2000.

[16]  David S. Rosenblum A Practical Approach to Programming With Assertions , 1995, IEEE Trans. Software Eng..