3. Criteria

Suppose we have a program P that is supposed to meet a specification S. For simplicity P is a function from inputs to outputs, and S is a function that takes an input and an output and returns a boolean. Our aim in testing is to find a test case t such that:

S (t, P(t))

is false: that is, P produces a result for the input t that is not permitted by S. We will call t a failing test case.

A test suite T is a set of test cases. When is a suite ‘good enough’? We can apply an evaluation criterion:

Most criteria don’t involve both the program and the specification.