Software testing based on formal specifications: a theory and a tool

This paper addresses the problem of constructing test data sets from formal specifications. Starting from a notion of an ideal exhaustive test data set which is derived from the notion of satisfaction of the formal specification, it is shown how to select by refinements a practicable test set, i.e. computable, not rejecting correct programs (unbiased), and accepting only correct programs (valid), assuming some hypotheses. The hypotheses play an important role: they formalize common test practices and they express the gap between the success of the test and correctness ; the size of the test set depends on the strength of the hypotheses. The paper shows an application of this theory in the case of algebraic specifications and presents the actual procedures used to mechanically produce such test sets, using Horn clause logic. These procedures are embedded in an interactive system which, given some general hypotheses schemes and an algebraic specification, produces a test set and the corresponding hypotheses.

[1]  Pierre Deransart,et al.  An Operational Algebraic Semantics of Prolog Programs , 1983, Logic Programming Workshop.

[2]  Peter Schnupp,et al.  Test case generation using Prolog , 1985, ICSE '85.

[3]  Laurent Fribourg,et al.  Application of Prolog to Test Sets Generation from Algebraic Specifications , 1985, TAPSOFT, Vol.2.

[4]  Heinrich Hußmann,et al.  Experiences with the RAP System - A Specification Interpreter Combining Term Rewriting and Resolution , 1986, ESOP.

[5]  B GoodenoughJohn,et al.  Toward a theory of test data selection , 1975 .

[6]  Samuel N. Kamin Final Data Types and Their Specification , 1983, TOPL.

[7]  Richard G. Hamlet,et al.  Data Abstraction, Implementation, Specification, and Testing , 1981, TOPL.

[8]  Laurent Fribourg,et al.  Test sets generation from algebraic specifications using logic programming , 1986, J. Syst. Softw..

[9]  G. T. Scullard Test Case Selection using VDM , 1988, VDM Europe.

[10]  Stéphane Kaplan,et al.  Conditional Rewrite Rules , 1984, Theor. Comput. Sci..

[11]  Lee Naish,et al.  Negation and Control in Prolog , 1986, Lecture Notes in Computer Science.

[12]  M. H. van Emden,et al.  Logic Programming with Equations , 1987, J. Log. Program..

[13]  Mehmet Dincbas,et al.  Metacontrol of Logic Programs in Metalog , 1984, FGCS.

[14]  Laurent Fribourg,et al.  SLOG: A Logic Programming Language Interpreter Based on Clausal Superposition and Rewriting , 1985, SLP.

[15]  Oliver Schoett,et al.  Data abstraction and the correctness of modular programming , 1986 .

[16]  Elaine J. Weyuker,et al.  On Testing Non-Testable Programs , 1982, Comput. J..

[17]  Donald Sannella,et al.  On Observational Equivalence and Algebraic Specification , 1985, TAPSOFT, Vol.1.