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.

14 Compositional<br />

<strong>Model</strong>ing<br />

<strong>We</strong> have seen many different uses of composition in the previous chapters. In this<br />

chapter we are going to take a closer look at the use of composition as a general<br />

modeling technique to break down larger models into smaller models.<br />

<strong>We</strong> are going to look at an example that illustrates how this technique can be<br />

applied to real-life complex application-level network protocols. Such protocols are<br />

abundant. Modern software architectures rely heavily on the fact that two parties<br />

that need to communicate, for example a client and a server, or two servers, do so<br />

by using a well-defined (application-level network) protocol.<br />

<strong>We</strong> then discuss some of the main properties of model program composition and<br />

provide a summary of the various uses of model program composition.<br />

14.1 <strong>Model</strong>ing protocol features<br />

A real-life protocol can be intrinsically complex. There are several reasons for this.<br />

A protocol typically has multiple layers and depends on or uses other protocols.<br />

In a good protocol design, internal details of the underlying protocols should not<br />

leak out and the layering principle should be maintained. Another reason is that a<br />

protocol typically includes many different features within a single layer. Intuitively,<br />

a feature is a part or an aspect of the overall functionality of the protocol. Features<br />

interact and together define the protocol as a whole.<br />

An important property of protocols is that enough information is present in<br />

messages, usually in message headers, so that it is possible to maintain a consistent<br />

view of the state of the protocol on both sides of the protocol users.<br />

In the protocol model in this chapter, the actions of the model program represent<br />

the messages of the protocol. A run of the model program represents a session where<br />

client and server exchange messages, as shown in Figure 14.18. The steps we follow<br />

in the feature-oriented modeling of a protocol are the following:<br />

more free ebooks download links at:<br />

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

223

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

Saved successfully!

Ooh no, something went wrong!