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.

450 Wolfgang Prenn<strong>in</strong>ger, Mohammad El-Ramly, and Marc Horstmann<br />

exist<strong>in</strong>g tools are used, there is not much freedom <strong>in</strong> select<strong>in</strong>g a test case generation<br />

method, as the study is then constra<strong>in</strong>ed by the methods supported by<br />

the tool. All the methods used employ some search algorithm(s). The output of<br />

a test case generation algorithm is a suite of abstract test cases that still need to<br />

be <strong>in</strong>stantiated as described <strong>in</strong> the next section. In the follow<strong>in</strong>g we elaborate on<br />

the different methods used for test case generation <strong>in</strong> the case studies reviewed.<br />

We focus on the methods and tools not covered <strong>in</strong> Sec. 14.2.<br />

In [SA99], the authors used their own system prototype for test generation.<br />

The prototype enumerates all the possible paths on the FSM (i.e. the test model)<br />

of the SUT of a given f<strong>in</strong>ite length. Despite the small size of the FSMs extracted<br />

<strong>in</strong> this case study, it is <strong>in</strong>feasible to enumerate all possible state transition paths<br />

from the <strong>in</strong>itial state due to the presence of loops. Each generated path is an<br />

abstract test case, consist<strong>in</strong>g of a sequence of processor <strong>in</strong>structions with different<br />

events at different stages. In this study, two types of abstract test cases were<br />

generated: snapshot and temporal test cases. In a snapshot test case the exact<br />

tim<strong>in</strong>g of events is considered, while <strong>in</strong> a temporal test case, only the order of<br />

events matters.<br />

Abstract Test Case Generation Us<strong>in</strong>g TGV As <strong>in</strong>dicated <strong>in</strong> [CJRZ01] and<br />

[KVZ98], TGV was used for abstract test case generation <strong>in</strong> these two studies.<br />

TGV outputs a test case DAG (Directed Acyclic Graph). The paths of this<br />

DAG represent possible system runs of the SUT. Detailed discussion of TGV is<br />

<strong>in</strong> Sec. 14.2.10.<br />

Abstract Test Case Generation Us<strong>in</strong>g GOTCHA In [DBG01] and [FHP02], the<br />

process of test generation is automated by GOTCHA [HN99], which explores the<br />

state space described by the <strong>in</strong>put GDL model. The test eng<strong>in</strong>eer has several<br />

alternative test generation strategies, <strong>in</strong>clud<strong>in</strong>g perform<strong>in</strong>g breadth-first search<br />

and coverage-directed search, from each of the start states. Coverage-directed<br />

search <strong>in</strong>volves giv<strong>in</strong>g priority to explor<strong>in</strong>g states that lead to new coverage tasks.<br />

Coverage is a measure of the completeness of a test suite, i.e., the percentage<br />

of a program exercised by the test suite. This will typically <strong>in</strong>volve collect<strong>in</strong>g<br />

<strong>in</strong>formation about which parts of a program are actually executed when runn<strong>in</strong>g<br />

the test suite <strong>in</strong> order to identify which branches of the conditional statements<br />

have been taken. The most basic level of test coverage is code coverage test<strong>in</strong>g<br />

and the most methodical is path coverage test<strong>in</strong>g. A coverage task is a task<br />

specified <strong>in</strong> the test specification that the test suite must satisfy. This is done<br />

by <strong>in</strong>clud<strong>in</strong>g <strong>in</strong> the test suite a set of test cases that satisfy the task. Coveragedirected<br />

search aims to f<strong>in</strong>d paths through the FSM model that satisfy each<br />

coverage task. To do so, GOTCHA starts by construct<strong>in</strong>g a search tree that<br />

explores the entire state space. This is done by travers<strong>in</strong>g all the reachable<br />

states of the FSM model. After enumerat<strong>in</strong>g the entire reachable state space, a<br />

random coverage task is chosen from those that have not yet been covered or<br />

proved to be uncoverable. A test case is generated by construct<strong>in</strong>g an execution<br />

path to the coverage task (state <strong>in</strong> this case) then cont<strong>in</strong>u<strong>in</strong>g on to a f<strong>in</strong>al state.<br />

At the po<strong>in</strong>t when the recommended test length is exceeded or a f<strong>in</strong>al state is

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

Saved successfully!

Ooh no, something went wrong!