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.

196 Machiel van der Bijl and Fabien Peureux<br />

the observation of quiescence where it is not allowed accord<strong>in</strong>g to the specification.<br />

For outputs that are allowed, we cont<strong>in</strong>ue the test derivation with<br />

tx , tθ respectively.<br />

Example. We illustrate the test derivation algorithm with our coffee mach<strong>in</strong>e<br />

specification like the one shown on the left hand side <strong>in</strong> figure 7.6. We will show<br />

how to derive an LTS with the algorithm. We use the same test case as used<br />

to expla<strong>in</strong> the test case def<strong>in</strong>ition, see Figure 7.10. When we start, the set S<br />

consists of only the start state q1 of our specification. We choose one of the three<br />

rules of the test derivation algorithm. Randomly, we start with apply<strong>in</strong>g rule 2 of<br />

the test derivation algorithm and apply the <strong>in</strong>put button. This is possible, s<strong>in</strong>ce<br />

q1 after button = {q2} (�= ∅). The result is the transition (t0, !button, t1) <strong>in</strong>our<br />

test case. The set S is updated to S = {q2}. So we now have a test case with the<br />

stimulus button. Now we choose to observe responses from the implementation<br />

under test; we apply rule three. There are three possible responses: tea, coffee<br />

and quiescence. We compute out(q1) ={δ} of the specification. So, the only<br />

allowed output is quiescence. Therefore we add a transition with tea to a failstate<br />

(t1, ?tea, t2) and a transition with coffee to a fail state (t1, ?coffee,t4).<br />

For the allowed response δ we add the transition (t1,θ,t3). We update S with<br />

S after δ = {q2}. We aga<strong>in</strong> apply the stimulus button which results <strong>in</strong> the<br />

transition (t3, button, t5) andS = {q3}. For rule 3 there are now two options,<br />

either the response coffee or tea, s<strong>in</strong>ce out(q2) ={coffee, tea}. We can add the<br />

transitions (t5, ?tea, t6), (t5, ?coffee,t8) and(t5,θ,t7) wheret7 is a fail-state.<br />

Because of non-determ<strong>in</strong>ism <strong>in</strong> the specification we have two possible paths to<br />

cont<strong>in</strong>ue with. For the “tea” path we update S with {q5} and for the “coffee”<br />

path we update S with {q4}. We can <strong>in</strong> pr<strong>in</strong>ciple cont<strong>in</strong>ue forever with choos<strong>in</strong>g<br />

between step 2 and three of the test derivation algorithm until we reach a f<strong>in</strong>al<br />

state <strong>in</strong> the specification or until we want to stop. In our case the specification<br />

has reached a f<strong>in</strong>al state and we can apply rule 1 to stop the recursion. This<br />

transforms states t6 and t8 <strong>in</strong>to pass-states.<br />

7.5.1 Conformance Test<strong>in</strong>g Based on Input/Output State Mach<strong>in</strong>e<br />

In practice, system test<strong>in</strong>g is performed with test suites. Each test case of a test<br />

suite is def<strong>in</strong>ed to verify that a specific property of the specifications is correctly<br />

implemented, or to detect a precise fault <strong>in</strong> the implementation. A test case<br />

can be seen as a f<strong>in</strong>ite sequence of <strong>in</strong>teractions between a tester and the tested<br />

implementation. This process ends by the assignment of a verdict (usually pass,<br />

fail or <strong>in</strong>conclusive).<br />

The method of conformance test<strong>in</strong>g <strong>in</strong>troduced by M. Phalippou on IOSM is<br />

different [Pha93]. Indeed, his idea consists <strong>in</strong> consider<strong>in</strong>g <strong>in</strong> a global way the set<br />

of all <strong>in</strong>teractions and sequences of <strong>in</strong>teractions between the tester and the tested<br />

implementation. Accord<strong>in</strong>g to this pr<strong>in</strong>ciple, a unique object, called canonical<br />

tester, is def<strong>in</strong>ed to represent <strong>in</strong> the one hand all the executions performed by a<br />

given test suite, and <strong>in</strong> the other hand all its execution.

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

Saved successfully!

Ooh no, something went wrong!