07.01.2013 Views

Lecture Notes in Computer Science 3472

Lecture Notes in Computer Science 3472

Lecture Notes in Computer Science 3472

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

14 Tools for Test Case Generation 399<br />

14.2.2 Lurette<br />

Introduction<br />

The approach of Lurette3 is generally comparable to Lutess which has been<br />

presented above [RNHW98]. Lurette is also based on the synchronous dataflow<br />

language Lustre. Both tools build their test harness from three elements, namely<br />

the SUT, a test sequence generator, and an oracle. Moreover, both tools derive<br />

the test sequence generator from an environment description written <strong>in</strong> Lustre<br />

while the SUT is tested as a black box. F<strong>in</strong>ally, both tools utilize environment<br />

descriptions and oracles given as synchronous observers. Synchronous observers<br />

are programs which implement acceptors for sequences. A synchronous observer<br />

used as environment description will output true as long as the sequence presented<br />

to the observer represents a valid sequence of events <strong>in</strong> the environment.<br />

However, <strong>in</strong> contrast to Lutess, Lurette allows to validate systems which<br />

have numerical <strong>in</strong>puts and outputs. On the other hand, Lurette is only offer<strong>in</strong>g<br />

a s<strong>in</strong>gle mode for test sequence generation. The randomly generated sequences<br />

are based on a uniform distribution. Also, Lurette requires that the SUT is given<br />

as a C-file which implements a predef<strong>in</strong>ed set of procedures.<br />

The test sequence is generated on the fly dur<strong>in</strong>g the execution of the SUT.<br />

An <strong>in</strong>itial <strong>in</strong>put is provided by the test sequence generator and fed <strong>in</strong>to SUT.<br />

From then on, the SUT and the test sequence generator compute outputs and<br />

<strong>in</strong>puts <strong>in</strong> an alternat<strong>in</strong>g fashion.<br />

Test<strong>in</strong>g Method<br />

The test<strong>in</strong>g method of Lurette is relatively simple. The environment description<br />

is used to express both relevant and <strong>in</strong>terest<strong>in</strong>g test sequences. In [RNHW98],<br />

the term relevance refers to those properties which constra<strong>in</strong> the environment<br />

itself and the term <strong>in</strong>terest refers to the test purpose. The constra<strong>in</strong>ts which represent<br />

the relevance and the <strong>in</strong>terest are expressed with<strong>in</strong> the same synchronous<br />

observer, i.e., there is no dist<strong>in</strong>ction between the environment description and<br />

the test purpose. This observer is fed with the <strong>in</strong>puts and outputs of the SUT<br />

and evaluates to true, if the sequence so far is relevant and <strong>in</strong>terest<strong>in</strong>g.<br />

A test sequence generated by Lurette is constructed uniformly and randomly<br />

such that the observer evaluates to true <strong>in</strong> every s<strong>in</strong>gle step of the sequence.<br />

In other words, Lurette has to <strong>in</strong>vert the environment description to compute a<br />

new <strong>in</strong>put vector for the SUT based on the current state of the environment and<br />

the last output of the SUT. The oracle is also fed with the <strong>in</strong>puts and outputs<br />

of the SUT to evaluate the correctness of the sequence. The result of the oracle<br />

is either a fail or pass verdict.<br />

Test Sequence Generation<br />

In each step of the test sequence generation, Lurette has to compute an <strong>in</strong>put<br />

vector for the SUT based on the <strong>in</strong>ternal state of the environment description<br />

3 See also http://www-verimag.imag.fr/SYNCHRONE/lurette/lurette.html.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!