Requirement Based Test Case
Generation
The Graybox methodology uses the
assertion testing method to preset all conditions
required prior to a program test. "One way to
ensure that a core program is correct to a very
large degree is to use formal verification"
[Tuck98]. When software requirements are
stated in a formal specification language it is
possible to execute the software requirement
and verify that the requirement is stated
correctly. By using the preconditioned
Predicates and executing the software
requirements it is now possible to generate the
expected results, the post-conditional
Verifications. The Graybox method will use
the Predicates and Verifications defined by the
requirements specification language as inputs
to the requirements based test case generation
phase. "A program Q is said to be totally
correct with respect to the input if for every
input the program terminates and the output
assertion is true" CGettrick821.
If the requirements are not in an
executable form then the requirements writer
can generate Predicates and Verifications using
the following simple method. For each input
assign a value that is not zero or one unless
these are the only valid values. Walk through
the requirement transforming the inputs into
outputs. Upon completion of the requirement
traversal, the inputs are the Predicates and the
outputs are the Verifications. This set of
Predicates and Verifications becomes a
requirement-based test case. If a conditional
statement was encountered during the
evaluation of the requirement, then subsequent
traversals of the requirement are required until
all conditionals have been satisfied. Simply
stated, if the requirement contains no
conditional statements, then one test case will