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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

13 Real-Time and Hybrid Systems Test<strong>in</strong>g 365<br />

situations of an erroneous implementation of a sample constra<strong>in</strong>t S. Implementation<br />

I1 shows the case that the required output E1 is not produced with<strong>in</strong> the<br />

<strong>in</strong>terval [t1, t2). In contrast, output E1 occurs to early <strong>in</strong> implementation I2. I3<br />

demonstrates the situation <strong>in</strong> which an output is produced with<strong>in</strong> the required<br />

<strong>in</strong>terval [t1, t2) but the event associated with the output is <strong>in</strong>correct. S<strong>in</strong>ce the<br />

quantity be<strong>in</strong>g tested is the delay <strong>in</strong>troduced by the SUT, there are no <strong>in</strong>put<br />

parameters for the tester to vary. Therefore, it also does not make a difference<br />

whether the time doma<strong>in</strong> boundaries are open or closed ones.<br />

I1<br />

t1<br />

¬E1<br />

t2<br />

S<br />

I3<br />

t<br />

t1<br />

t1<br />

E1<br />

E2<br />

Fig. 13.4. Erroneous implementations of performance constra<strong>in</strong>ts<br />

For behavioral constra<strong>in</strong>ts each of the two time doma<strong>in</strong> boundaries is verified<br />

by up to two test po<strong>in</strong>ts. As shown <strong>in</strong> Figure 13.5, the number and position of the<br />

test po<strong>in</strong>ts for each doma<strong>in</strong> boundary depends on its type and value. In contrast<br />

to the performance constra<strong>in</strong>ts, for behavioral constra<strong>in</strong>ts it makes a difference<br />

whether the time doma<strong>in</strong> boundaries are open or closed ones, because test po<strong>in</strong>ts<br />

have to be used close to these boundaries. One test po<strong>in</strong>t is always placed directly<br />

on the doma<strong>in</strong> boundary. For closed doma<strong>in</strong> boundaries the second test po<strong>in</strong>t is<br />

placed at a distance of ɛ outside the boundary. For open doma<strong>in</strong> boundaries the<br />

second test po<strong>in</strong>t is placed at a distance ɛ <strong>in</strong>side the boundary. For the special<br />

case where the upper boundary is ∞, it is not possible to place a test po<strong>in</strong>t at<br />

the doma<strong>in</strong> boundary. It is approximated by plac<strong>in</strong>g a test po<strong>in</strong>t at time Tmax<br />

after the start of the <strong>in</strong>terval, where Tmax is the longest constra<strong>in</strong>t <strong>in</strong>terval <strong>in</strong><br />

the system specification. For both open and closed <strong>in</strong>terval boundaries, the up<br />

to two tests per boundary are sufficient to verify that the required change <strong>in</strong><br />

system behavior has occurred with<strong>in</strong> ɛ time units with respect to the required<br />

po<strong>in</strong>t <strong>in</strong> time.<br />

A test suite can be derived by generat<strong>in</strong>g test cases so that both coverage<br />

criteria are fulfilled. The follow<strong>in</strong>g three steps are used for test case generation:<br />

(1) Deriv<strong>in</strong>g test process templates from the constra<strong>in</strong>t graph. These templates<br />

will supply <strong>in</strong>puts at some time with<strong>in</strong> the required <strong>in</strong>terval, observe the<br />

outputs of the SUT to verify that they are generated with<strong>in</strong> the correct time<br />

<strong>in</strong>terval, and term<strong>in</strong>ate with ⊤ if the test is successful or ⊥ if the test fails.<br />

t2<br />

t2<br />

I2<br />

t<br />

t<br />

E1<br />

t1<br />

t2<br />

t

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

Saved successfully!

Ooh no, something went wrong!