Information Technology Reference
In-Depth Information
prop_create_234() ->
?FORALL(Media,media(),
?FORALL(Channel,streamtype(Media),
?FORALL(Codec,codec(Media),
create_234(Media,Channel,Codec)).
Now the tester can add additional alternatives to the generator which will au-
tomatically increase the number of tests, without having to copy and paste test
cases. In addition, the test code becomes more structured and readable.
This example shows how refactoring and related transformations in Wrangler
can be used to support the extraction of Quick Check properties from 'free' tests.
A similar approach allows Quick Check properties to be extracted from EUnit
tests, and we anticipate implementing a suite of transformations supporting in
the near future.
8 Conclusions
Our work on property discovery has already shown very promising results. Work-
ing with our industrial partners we are now close to having automatic support
for extracting properties from test cases. In addition, we have worked on two
other ways of obtaining properties from specification, viz. obtaining properties
from data type definitions and from databases. The methods have been eval-
uated by the Swedish company Klarna, and Ericsson's OTP team, and have
shown their immediate benefit. We have developed a tool, called QuickSpec that
can automatically generate properties for a given library of functions.
We have developed two methods to extract properties from test cases. One is
dynamic, the other static. In the first approach, the test cases are run, generating
traces for the program, from these traces a finite state machine can be abstracted.
The second approach works on the level of the source code of the test cases. It is
a guided automatic approach; testers know best what part of the test case they
like to generate and what part they want to keep specific.
Our work on test and property evolution has concentrated on the develop-
ment of the Wrangler refactoring tool that can be used to support refactorings
of tests, test-aware refactorings and property discovery. We have investigated
the impact of various refactorings on the industrial practise of testing using:
EUnit, QuickCheck, and Common Test / OTP Test Server, and have worked
on extending Wrangler with refactorings of EUnit test data. We have begun the
integration of Wrangler into the Eclipse binding for Erlang, Erlide.
In property monitoring we have developed a prototype tool that automati-
cally analyses a set of log files given a description of what constitutes the 'key'
and what is the interesting 'value', and is capable of handling some non-trivial
inter-log-file relations.
We have made significant progress in our work on analysing concurrent sys-
tems. Our work on developing methods to shrink trace counter-examples (re-
sulting from testing or model checking concurrent systems) has resulted in the
Search WWH ::




Custom Search