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.

16 Reactive Systems<br />

This chapter discusses testing of reactive systems. Reactive systems take inputs as<br />

well as provide outputs in the form of spontaneous reactions. The behavior of a reactive<br />

system, especially when distributed or multithreaded, can be nondeterministic.<br />

Therefore, the main difference compared to testing of closed systems is that some<br />

of the outputs of the implementation under test (IUT) may be outside the control<br />

of the tester; that is, the tester cannot predict what the exact output will be during<br />

testing. There may be multiple possible outputs and the subsequent tester inputs<br />

may depend on those outputs.<br />

Many software systems are reactive, for example many application-level network<br />

protocols and multithreaded APIs are reactive. Such systems may produce spontaneous<br />

outputs like asynchronous events. Factors such as thread scheduling are not<br />

entirely under the control of the tester but may affect the observable behavior. In<br />

these cases, a test suite generated offline may be infeasible, since all of the observable<br />

behaviors would have to be encoded a priori as a decision tree, and the size of such a<br />

decision tree can be very large.<br />

The main topic of this chapter is on-the-fly testing of reactive systems. The<br />

presentation of most of the material builds on on-the-fly testing of closed systems that<br />

was the topic of Chapter 12. In reactive systems, the action vocabulary is divided into<br />

controllable and observable action symbols. This terminology is tailored to match<br />

the point of view of the tester. Actions whose symbol is controllable are under the<br />

control of the tester and actions whose symbol is observable are under the control<br />

of the IUT.<br />

16.1 Observable actions<br />

The action vocabulary of every model program can be split into two sets of action<br />

symbols, controllable ones and observable ones. Whether an action symbol is controllable<br />

or observable often depends on what part of the system is being tested and<br />

more free ebooks download links at:<br />

http://www.ebook-x.com<br />

259

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

Saved successfully!

Ooh no, something went wrong!