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 ""
multitestcase MyParallelTest (LIST of STRING lsMachines)

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

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