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

Jonathan Jacky, Margus Veanes, Colin Campbell, Wolfram Schulte

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

2. Client/server: test suite generated with scenario control.
Systems with Finite Models 141
TestSuite(
TestCase(
ServerSocket(),
ServerBind(),
ServerListen(),
ClientSocket(),
ClientConnect(),
ServerAccept(),
ServerSend(double("100")),
ClientReceive_Start(),
ClientReceive_Finish(double("100")),
ServerSend(double("99.9")),
ClientReceive_Start(),
ClientReceive_Finish(double("99.9")),
ClientSend(),
ServerReceive(),
ClientClose(),
ServerCloseConnection(),
ServerClose()
)
)
Figure 8.3. Client/server: test suite file contents, showing a trace with terms.
The otg tool saves test suites in text files. Figure 8.3 shows the contents of
ScenarioTest.txt, which describes the test suite with one test case whose FSM
is displayed in Figure 8.2. Each test case in a test suite file is a trace, text that
represents a program run. A trace is not expressed in C# code, although it resembles
code (compare the trace in Figure 8.3 to the unit test in Chapter 2, Figure 2.10,
and also to the trace we wrote in Chapter 5, Section 5.6.1). A trace is a sequence
of actions. Each action is expressed as a term, a data structure that the tools use to
represent actions. The syntax of terms is easy to understand, but differs from the
syntax of C# method calls. The tools use terms because they are easier to work with
than program text. You must work with terms in your test harness code.


Pages:
184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208
hotel jelenia góra Russian bride Free English grammar and study guid powiekszenia wielkoformatowe counter strike 1.6