Test Template Framework

The Test Template Framework (TTF) is a model-based testing (MBT) framework proposed by Phil Stocks and David Carrington in (Stocks & Carrington 1996) for the purpose of software testing.

Although the TTF was meant to be notation-independent, the original presentation was made using the Z formal notation.

It is one of the few MBT frameworks approaching unit testing.

The TTF is a specific proposal of model-based testing (MBT).

It considers models to be Z specifications.

Each operation within the specification is analyzed to derive or generate abstract test cases.

This analysis consists of the following steps: One of the main advantages of the TTF is that all of these concepts are expressed in the same notation of the specification, i.e. the Z notation.

Hence, the engineer has to know only one notation to perform the analysis down to the generation of abstract test cases.

In this section the main concepts defined by the TTF are described.

be all the input and (non-primed) state variables referenced in

, is the Z schema box defined by

The Valid Input Space (VIS) of

, is the Z schema box defined by

be any predicate depending on one or more of the variables defined in

Note that this schema is equivalent to

, then the Z schema box defined by

According to this definition the VIS is also a test class.

In the context of the TTF a testing tactic[1] is a means to partition any test class of any operation.

This process can continue by applying testing tactics to the test classes generated so far.

Evidently, the result of this process can be drawn as a tree with the VIS as the root node, the test classes generated by the first testing tactic as its children, and so on.

Furthermore, Stocks and Carrington in (Stocks & Carrington 1996) propose to use the Z notation to build the tree, as follows.

It is likely, then, that some test classes are empty because their predicates are contradictions.

These test classes must be pruned from the testing tree because they represent impossible combinations of input values, i.e. no abstract test case can be derived out of them.

The TTF prescribes that abstract test cases should be derived only from the leaves of the testing tree.

Abstract test cases can also be written as Z schema boxes.

be the characteristic predicates of each test class from

(by following the edges from child to parent), and let

constant values satisfying

Then, an abstract test case of

is the Z schema box defined by