This example shows how you direct sets of test case statements to particular machines. If you were doing functional testing of one application, you might want to drive the server first and then the application. However, this example is not realistic because it does not show the support necessary to bring the different machines to their different application states and to recover from a failure on any machine.
testcase TestClient_Server ()
Connect ("server")
Connect ("client1")
Connect ("client2")
DoSomeSetup ("server")
UpdateDatabase ("client1")
UpdateDatabase ("client2")
DisconnectAll ()
DoSomeSetup (STRING sMachine)
HTIMER hTimer
hTimer = TimerCreate ()
TimerStart (hTimer)
SetMachine (sMachine)
// code to do server setup goes here
TimerStop (hTimer)
Print ("Time on {sMachine} is: {TimerStr (hTimer)}")
TimerDestroy (hTimer)
UpdateDatabase (STRING sMachine)
HTIMER hTimer
hTimer = TimerCreate ()
TimerStart (hTimer)
SetMachine (sMachine)
// code to update database goes here
TimerStop (hTimer)
Print ("Time on {sMachine} is: {TimerStr (hTimer)}")
TimerDestroy (hTimer)