A state table includes a plurality of possible states of a computer system
and the corresponding actions which produce transitions between source
and target states. A set of test programs is stored, each test program
performing an action in the state table. A test selects an action
corresponding to the current state of the computer system; executes the
test program which performs the selected action; determines the state of
the computer system after the test program has executed; and compares the
determined state to the state indicated in the state table as the target
state to the selected action on the source state. When an error is found,
instead of stopping execution, the test operations to be performed are
dynamically reconfigured. Weightings are dynamically allocated to actions
in the state table to create a weighted set, and selection of the next
test is carried out using random selection over the weighted set. Thus,
the continued testing is biased over time towards particular transitions
and/or states near to the error location. This enables a tester to
discover any other bugs in the same area and also to obtain further
diagnostic data on the failure.