27.07.2013 Views

2 Why We Need Model-Based Testing

2 Why We Need Model-Based Testing

2 Why We Need Model-Based Testing

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.

234 Compositional <strong>Model</strong>ing<br />

FSM(0, AcceptingStates(0),<br />

Transitions(t(0,Cancel(2),0), t(0,ReqSetup(2),0), t(0,ResSetup(2),0)),<br />

Vocabulary("ResWork", "ReqWork"))<br />

Figure 14.8. A scnenario used to restrict the cancellation model program.<br />

Map() Cancel(2)<br />

ReqSetup(2,_) ResSetup(2, _, Status("Completed"))<br />

Map(2 -> Mode("Sent"))<br />

Cancel(2)<br />

Map(2 -> Mode("CancelRequested"))<br />

ResSetup(2, _, Status("Cancelled"))<br />

ResSetup(2, _, Status("Completed"))<br />

Cancel(2)<br />

Figure 14.9. Composition of the cancellation model program in Figure 14.7 with the scenario in Figure 14.8.<br />

The labels on the states show the value of mode.<br />

FSM(0, AcceptingStates(0),<br />

Transitions(t(0,Cancel(2),0), t(0,ReqSetup(2),0), t(0,ResSetup(2),0),<br />

t(0,Cancel(3),0), t(0,ReqSetup(3),0), t(0,ResSetup(3),0)),<br />

Vocabulary("ResWork", "ReqWork"))<br />

Figure 14.10. Another scnenario used to restrict the cancellation model program.<br />

the cancellation model program, then the complexity increases quadratically in the<br />

number of states (is proportional to the square of the number of states) as is shown<br />

in Figure 14.11, because the modes of distinct message IDs are independent.<br />

14.2.4 Commands feature<br />

The third protocol feature that we consider specifies that if a request and a response<br />

message have the same message identifiers then the command fields must also be<br />

the same (see Figure 14.12). The action vocabulary of this model program includes<br />

all the action symbols besides Cancel.<br />

more free ebooks download links at:<br />

http://www.ebook-x.com

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

Saved successfully!

Ooh no, something went wrong!