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

Create successful ePaper yourself

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

274 Reactive Systems<br />

The stepper consumes the events produced by the multiplexer, filters out the<br />

resource usage events, and maps all the other events into observable actions that are<br />

enqueued into the observation queue of the conformance tester.<br />

Consider the example with two agents A1 and A2 depicted in Figure 16.7. A<br />

possible sequence of events that are entered into the observation queue is<br />

(a, e, b, c, f, g, d)<br />

An asynchronous stepper can use a multiplexer to enqueue events into the observation<br />

queue of the conformance tester. For example, in the stepper of the SP<br />

server shown in Figure 16.5, if the different requests to the server always start different<br />

threads that may share resources and the server supports per-thread response<br />

handlers, then multiplexing of the thread-based events could be integrated into the<br />

responder.<br />

16.7 Exercises<br />

1. Consider the revision control system model program in Chapter 10. What<br />

actions are controllable and what actions are observable? Motivate.<br />

2. Extend the sample SP server and stepper to handle cancellation and run ct to<br />

experiment with it.<br />

3. Define an FSM that accepts the closure Timeout() ∗ and compose it with the<br />

model program SP[Credits,Commands,Setup] and Wait20 as defined in Section<br />

16.5.1. What kind of test results do you expect when you run ct on this?<br />

4. Write a adaptive strategy that tries to cover partially explored states as discussed<br />

in Section 16.5.2 assuming that the IUT is determinisitic.<br />

5. Implement the multiplexing algorithm discussed in Section 16.6.1.<br />

6*. Implement a passive tester (as discussed in Section 16.5.3) that multiplexes<br />

events from multiple log files.<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!