background image
<< Multi-Application - DefaultBaseState function | Multi-Application - the multitestcase keyword >>
Multi-Application - Concurrency test explained
<< Multi-Application - DefaultBaseState function | Multi-Application - the multitestcase keyword >>
User's Guide
391
22 M
ULTI
-A
PPLICATION
T
ESTING
Concurrency test explained
for each sMachine in lsMachine
sError = GetMachineData (sMachine, "sMessage")
if (sMessage == NULL)
iSucceed += 1
else
Print ("Machine {sMachine} got message '{sMessage}'")
Verify (iSucceed, 1, "number of machines that succeeded")
Concurrency test explained
Before you record and/or code your concurrency test, you record window
declarations that describe the elements of the application's GUI. These are
placed in a file named frame.inc, which is automatically included with your
testcase when you compile. Use SilkTest to generate this file because
SilkTest does most of the work.
The following code sample gives just those window declarations that are used
in the concurrency test example:
window MainWin Personnel
tag "Personnel"
PopupList EmployeeList
Menu Employee
tag "Employee"
MenuItem Edit
tag "Edit"
// ...
window DialogBox Employee
tag "Employee"
parent Personnel
TextField Salary
tag "Salary"
PushButton OK
tag "OK"
// ...
The following explanation of the concurrency test example gives the testing
paradigm for a simple concurrency test and provides explanations of many of
the code constructs. This should enable you to read the example without
referring to the online Help. There you will find more detailed explanations
of these language constructs, plus explanations of the constructs not
explained here. The explanation of each piece of code follows that code.
const ACCEPT_TIMEOUT = 15