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.

12.5 Summary<br />

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

In this chapter we have shown how the search problem of f<strong>in</strong>d<strong>in</strong>g test cases<br />

that satisfy given test case specifications can be solved by apply<strong>in</strong>g well known<br />

techniques from computer science. After <strong>in</strong>troduc<strong>in</strong>g the basic term<strong>in</strong>ology and<br />

the used formalisms <strong>in</strong> each section, we have shown how techniques and tools<br />

from theorem prov<strong>in</strong>g, symbolic execution, andmodel check<strong>in</strong>g can be applied to<br />

perform, improve, or support test case generation based on a model of the SUT.<br />

At first, we have presented some approaches from the literature of how test<br />

case generation can be done by theorem prov<strong>in</strong>g. A formal specification of the<br />

SUT is transformed <strong>in</strong>to equivalence classes, which are assumed to represent<br />

the same behavior with respect to the test. Therefore, each equivalence class<br />

can be <strong>in</strong>terpreted as one test case. We have shown how such transformations<br />

<strong>in</strong>to equivalence classes resp. partitions can be performed us<strong>in</strong>g theorem prov<strong>in</strong>g<br />

technology. In particular, we described how general purpose theorem provers can<br />

be applied to generate test cases from Z specifications. Start<strong>in</strong>g at the purely<br />

syntactic disjunctive normal form approach, we have shown how to <strong>in</strong>tegrate semantic<br />

aspects by means of the classification-tree method, and how partition<strong>in</strong>g<br />

resp. fault-based heuristics can be used. Afterwards, we have covered test case<br />

generation by logic programm<strong>in</strong>g, i.e., we have shown how algebraic specifications<br />

can be translated <strong>in</strong>to Horn clauses from which test cases can be extracted<br />

by Prolog’s resolution pr<strong>in</strong>ciple. F<strong>in</strong>ally, we have shortly described test case<br />

extraction from correctness proofs. Topics for future research <strong>in</strong> this area are<br />

extensions regard<strong>in</strong>g test case sequenc<strong>in</strong>g and concurrency, broader constra<strong>in</strong>t<br />

solv<strong>in</strong>g abilities, and applications to a wider range of graphical notations.<br />

We have also shown that symbolic execution is a relevant technique to help<br />

cop<strong>in</strong>g with state space explosion while generat<strong>in</strong>g test cases. Symbolic execution<br />

is generic enough to be applied to abstract models as well as to concrete code.<br />

In particular, we have described three test case generation frameworks. The first<br />

two start by perform<strong>in</strong>g a translation of their respective abstract models (<strong>in</strong> the<br />

B and AUTOFOCUS modell<strong>in</strong>g language) <strong>in</strong>to a constra<strong>in</strong>t logic programm<strong>in</strong>g<br />

language. The result<strong>in</strong>g CLP model is then symbolically executed <strong>in</strong> order to<br />

search for traces that represent <strong>in</strong>terest<strong>in</strong>g test cases. In both examples a synergy<br />

between symbolic execution and theorem prov<strong>in</strong>g is established, given that logic<br />

programm<strong>in</strong>g is used to perform state space exploration. The third example<br />

framework demonstrates generat<strong>in</strong>g test cases start<strong>in</strong>g from Java code. A very<br />

<strong>in</strong>terest<strong>in</strong>g feature of this approach is that it uses model check<strong>in</strong>g to symbolically<br />

search the state space. In a way, this example comes to re<strong>in</strong>force the notion that<br />

symbolic execution is not used on its own to generate test cases – rather it is<br />

merged with other techniques <strong>in</strong> order to overcome their shortfalls, as well the<br />

ones <strong>in</strong> symbolic execution itself.<br />

F<strong>in</strong>ally, we have shortly described the application of model check<strong>in</strong>g <strong>in</strong> modelbased<br />

test case generation. Specifically, we have covered the relation between control<br />

flow resp. data flow oriented coverage criteria and the capability of model<br />

checkers to construct witnesses and counterexamples. There still rema<strong>in</strong> a number<br />

of open questions <strong>in</strong> this context. Most research efforts <strong>in</strong> model check<strong>in</strong>g

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

Saved successfully!

Ooh no, something went wrong!