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 52 | Next

Jonathan Jacky, Margus Veanes, Colin Campbell, Wolfram Schulte

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

0, the client only reads the first four, 100. here, and then
finds the remaining character(s) in the buffer the next time it calls Receive. In this
way, a single sample can cause the client to become unsynchronized with the server,
resulting in incorrect readings on one or more subsequent samples.4 The unit test of
Section 2.8 passed because the client Receive method uses Double.Parse to convert
the buffer contents to a floating point number. This returns the same result when
trailing zeroes are omitted, so the assertion did not detect that the final character was
missing from the sample. This test only acquired one sample; subsequent samples
that would have caused the assertion to fail were not requested.
You might object that this example is naive and unrealistic. In fact, it is a simplified
account of a real experience that was too complicated to describe here in full detail.
2.11 Lessons learned
Some defects can only be revealed by realistic scenarios that resemble actual application
program runs (as in Section 2.9), where we execute long sequences of
3 We distinguish defects (flaws in the code) from failures (occurrences where the program does
the wrong thing). Both are sometimes called bugs.
4 You can observe this by instrumenting Server.Send and Client.Receive with code that
shows the contents of sendBuf and receiveBuf, respectively.
30 Why We Need Model-Based Testing
different methods from several classes, and observe the effects of each method.


Pages:
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
hotel jelenia góra Russian bride Free English grammar and study guid powiekszenia wielkoformatowe counter strike 1.6