SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 263 | Next

Jonathan Jacky, Margus Veanes, Colin Campbell, Wolfram Schulte

"Model-Based Software Testing and Analysis with C#"

Note that there
must be two empty strings in the table at this point. By inspecting the implementation
we can see that when an element is deleted, a case is missing for the situation when
the count of the element that is deleted becomes 0. If this happens then the deletion
should also remove the element from the table. It is left as an exercise to the reader
to correct the two errors in the implementation and rerun ct.
12.4 Coverage-directed strategies
Coverage is a measure of how much testing has been done. Testing achieves better
coverage by exercising the implementation more thoroughly. A custom strategy can
be designed to achieve good coverage according to ameasure chosen by the designer.
The basic strategy provides random walks of a given number of steps, restarting
from the initial state each time. Purely random selection of actions may be wasteful,
and often one can do better. The basic idea is to keep a history of previously taken
steps. Here we look at how to implement a customized strategy for a given model
program that keeps track of a set of abstract coverage points. The algorithm that we
are presenting here should be seen as an example of how to implement your own
testing strategies, using the IStrategy and the ModelProgram interfaces as extension
points of the modeling library.
204 Testing Systems with Complex State
12.4.1 Coverage points
There are many ways to measure coverage.


Pages:
251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275
hotel jelenia góra Russian bride Free English grammar and study guid powiekszenia wielkoformatowe counter strike 1.6