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.

7 I/O-automata Based Test<strong>in</strong>g 195<br />

Def<strong>in</strong>ition 7.34. Let s ∈LTS(I , U ) be a specification with <strong>in</strong>itial state q0.<br />

Let S be a non-empty set of states, with <strong>in</strong>itially S = {q0}. A test case t ∈<br />

TEST (U ∪{θ}, I ) is obta<strong>in</strong>ed from S by a f<strong>in</strong>ite number of recursive applications<br />

of one of the follow<strong>in</strong>g three non-determ<strong>in</strong>istic choices:<br />

(1) pass<br />

(2)<br />

(3)<br />

t := pass<br />

Thetestcasewithonlythestatepass is always a sound test case. This<br />

rule stops the recursion <strong>in</strong> the algorithm.<br />

a<br />

✁❆<br />

✁ t ❆❆<br />

✁<br />

′<br />

t := a; t ′ where a ∈ I , S after a �= ∅ and t ′ is obta<strong>in</strong>ed by recursively apply<strong>in</strong>g<br />

the algorithm for S ′ = S after a.<br />

This step <strong>in</strong> the algorithm adds an <strong>in</strong>put action a to the test case. After apply<strong>in</strong>g<br />

the <strong>in</strong>put a, the test case behaves as t ′ which is obta<strong>in</strong>ed by apply<strong>in</strong>g<br />

the test derivation algorithm recursively to S ′ . t ′ is depicted as an abstract<br />

subtree (triangle) <strong>in</strong> the figure above.<br />

x1 x2 x3 θ<br />

fail fail<br />

✂❇<br />

✂ ❇❇❇❇<br />

t1 ✂<br />

✂✂<br />

✂❇<br />

✂ ❇❇❇❇<br />

t2 ✂<br />

✂✂<br />

t := Σ {x; fail | x ∈ U , x �∈ out(S)}<br />

+ Σ {θ; fail | δ �∈ out(S)}<br />

+ Σ {x; tx | x ∈ U , x ∈ out(S)}<br />

+ Σ {θ; tθ | δ ∈ out(S)}<br />

where tx and tθ are obta<strong>in</strong>ed by recursively apply<strong>in</strong>g the test derivation algorithm<br />

for S ′ = S after x , S after δ, respectively. In this def<strong>in</strong>ition + and<br />

Σ have the standard process algebraic mean<strong>in</strong>g. + stands for choice and Σ<br />

stands for the sum of all expressions <strong>in</strong> a set.<br />

In this step we add expected outputs to the test case. If the output is <strong>in</strong>correct<br />

accord<strong>in</strong>g to the specification we add a transition with the output<br />

to a fail state, thus end<strong>in</strong>g that part of the test case. The same holds for

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

Saved successfully!

Ooh no, something went wrong!