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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

15 Case Studies 441<br />

Test Model S<strong>in</strong>ce the term test model is not part of the glossary it will be<br />

<strong>in</strong>troduced here. We call the abstract formal behavior model of the SUT, which<br />

is used <strong>in</strong> conjunction with the test specification to derive test cases, a test<br />

model (also abstract test model or sometimes if the context is def<strong>in</strong>ed only<br />

model). In pr<strong>in</strong>ciple there are two ways for deriv<strong>in</strong>g test models. The first is to<br />

benefit from an exist<strong>in</strong>g model, whether it is a formal specification or a system<br />

development model of the SUT. For example, usually <strong>in</strong> the case studies that<br />

<strong>in</strong>volve a hardware SUT, a design model is available that is then abstracted to<br />

build a test model. The abstraction becomes necessary due to constra<strong>in</strong>ts given<br />

by the test case generator and the potential available test model traces, which<br />

have to be limited. The second way is to build the test model manually, based on<br />

<strong>in</strong>formation from the natural language specification of the SUT. For both cases<br />

a validation of the test model has to be assured. Sec. 15.4 illustrates both ways<br />

<strong>in</strong> more detail.<br />

Test Specification Besides a test model, a test specification is necessary <strong>in</strong> order<br />

to direct the test case generation. It has two aims, first to def<strong>in</strong>e formally what<br />

will be tested and second to restrict the amount of result<strong>in</strong>g test cases. The test<br />

specification def<strong>in</strong>es which of the potential available test model traces will form<br />

the test suite. Based on a test purpose, which can exist <strong>in</strong> different degrees of<br />

formalization, the test specification has to be <strong>in</strong> an operational state <strong>in</strong> order to<br />

use it <strong>in</strong> conjunction with the test model as <strong>in</strong>put for the test case generator.<br />

The type of test specification for the considered case studies can be categorized<br />

<strong>in</strong>to functional, structural or stochastic specifications (cf. also Chapter 11):<br />

• Functional specifications represent a set of environment behaviors or use<br />

cases <strong>in</strong> order to constra<strong>in</strong> the behavior of the test model to certa<strong>in</strong> functionalities.<br />

• Structural specifications can be applied to decomposed components, where<br />

different coverage criteria start<strong>in</strong>g from simple statement coverage up to path<br />

coverage are available.<br />

• Stochastic specifications select test cases by random or by a probability<br />

distribution and have been observed to be also useful <strong>in</strong> some fields, e.g. <strong>in</strong><br />

partition test<strong>in</strong>g [Nta98].<br />

Test Case Generation Once the test model and test specification are def<strong>in</strong>ed,<br />

test case generation can be started which results <strong>in</strong> a test suite. A test case is<br />

generated by construct<strong>in</strong>g an execution path of the test model which complies<br />

also to the restrictions of the test specification. This process cont<strong>in</strong>ues until all<br />

specified test cases are found.<br />

Test Case Instantiation In order to concentrate on the essential aspects of the<br />

SUT to be verified and to handle, <strong>in</strong> a lot of cases, the state explosion problem<br />

of the considered SUTs, the test models have to be on an abstract level. Thus<br />

the generated test cases/test suites are also at this abstraction level. Before the<br />

execution of these test cases, a concretization of the previously done abstractions

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

Saved successfully!

Ooh no, something went wrong!