Using the Parallel Template

This template is stored as parallel.t in the Examples subdirectory of the Silk Test Classic installation directory. The code tests a single application that runs on an externally defined set of machines.

This multi-test-case template accepts a list of machine names. The application whose main window is MyMainWin is invoked on each machine. The same operations are then performed on each machine in parallel. If any test case fails, the multi-test-case will be marked as having failed; however, a failed test case within a thread does not abort the thread.

You can use this template by doing three edits:

Use myframe.inc.
use "myframe.inc"
multitestcase MyParallelTest (LIST of STRING lsMachines)

  STRING sMachine
  
  // Connect to all machines in parallel:
  for each sMachine in lsMachines
    spawn
      SetUpMachine (sMachine, MyMainWin)
    rendezvous

  // Set app state of each machine, invoking if necessary:
  SetMultiAppStates()
  
  // Run testcases in parallel
  for each sMachine in lsMachines
    spawn
      SetMachine (sMachine)
      // Call testcase(s) or call main()
    rendezvous