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

Create successful ePaper yourself

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

12 Technology of Test-Case Generation 349<br />

tests, i.e. check<strong>in</strong>g whether the transitions between the operations <strong>in</strong> the test<br />

sequence are possible. If they are not, then that sequence of operations should<br />

not be applicable to the implementation - this type of tests are negative but<br />

also relevant to verify the correctness of the SUT.<br />

The next step <strong>in</strong> the approach is to def<strong>in</strong>e a set of hypotheses that will direct<br />

the symbolic execution of the axiomatized prototype. Unlike other frameworks<br />

described <strong>in</strong> this section, this one relies on human <strong>in</strong>tuition dur<strong>in</strong>g test case<br />

selection. Despite the fact that some of the possible automation dur<strong>in</strong>g this step<br />

is lost, the high-level language used to describe hypotheses about <strong>in</strong>terest<strong>in</strong>g test<br />

cases provides a basis to generate tests which are semantically mean<strong>in</strong>gful.<br />

The test eng<strong>in</strong>eer can express two types of hypotheses concern<strong>in</strong>g the tests<br />

that will be generated:<br />

• Regularity hypotheses: this type of hypotheses stipulates that if a test conta<strong>in</strong><strong>in</strong>g<br />

a variable v if valid for a subset of v satisfy<strong>in</strong>g an arbitrary complexity<br />

criteria, then it is valid for all of v’s doma<strong>in</strong> of greater complexity. The<br />

notion of variable <strong>in</strong> a test is very generic, <strong>in</strong>clud<strong>in</strong>g not only <strong>in</strong>put variables<br />

but also constra<strong>in</strong>ts on the shape of the sequence of operations that form the<br />

test. This is however a complex topic and the reader is referred to [Per98]<br />

for details;<br />

• Uniformity hypotheses: the uniformity hypotheses state that if a test conta<strong>in</strong><strong>in</strong>g<br />

a variable v is valid for one value of v, then it is valid for all of v’s<br />

doma<strong>in</strong>.<br />

After <strong>in</strong>troduction <strong>in</strong> the system of hypotheses by the test eng<strong>in</strong>eer, the prolog<br />

adapted eng<strong>in</strong>e (the resolution is not pure SLD 7 ) symbolically executes the<br />

un<strong>in</strong>stantiated tests aga<strong>in</strong>st the axiomatic def<strong>in</strong>ition of the application. The idea<br />

beh<strong>in</strong>d the approach is to extract from path condition of a given test the constra<strong>in</strong>ts<br />

on the variables correspond<strong>in</strong>g to the <strong>in</strong>put values of the operations<br />

present <strong>in</strong> that test. Given this knowledge it becomes possible to calculate the<br />

subdoma<strong>in</strong>s of the un<strong>in</strong>stantiated <strong>in</strong>put variables and apply uniformity hypotheses<br />

<strong>in</strong> a way that the operation behaviors described <strong>in</strong> the specification are taken<br />

<strong>in</strong>to consideration. This activity is somehow equivalent to what is performed by<br />

Legeard and Peureaux <strong>in</strong> [LP01] while calculat<strong>in</strong>g the P-Doma<strong>in</strong>s.<br />

Aga<strong>in</strong>, as with the previously described approaches, both theorem prov<strong>in</strong>g<br />

and symbolic execution techniques are used <strong>in</strong> this test case generation framework.<br />

Code-Based Test Case Generation In the last example of this section we<br />

will be describ<strong>in</strong>g a framework by Khurshid et al. [KPV03] that generates test<br />

7<br />

SLD is the standard mechanism used <strong>in</strong> logic programm<strong>in</strong>g languages <strong>in</strong> order to<br />

compute goal solutions

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

Saved successfully!

Ooh no, something went wrong!