Client/Server Template

This template is stored as multi_cs.t in the Examples subdirectory of the Silk Test Classic installation directory. This test case invokes the server application and any number of client applications, based on the list of machines passed to it, and runs the same function on all clients concurrently, after which the server will perform end-of-session processing.

You can use this template by doing the following edits:

use "myframe.inc"
multitestcase MyClientServerTest (STRING sServer, LIST of STRING lsClients)
  STRING sClient
  
  // Connect to server machine:
  SetUpMachine (sServer, MyServerApp)

  // Connect to all client machines in parallel:
  for each sClient in lsClients
    spawn
      SetUpMachine (sClient, MyClientApp)
  rendezvous

  // Set app state of each machine, invoking if necessary:
  SetMultiAppStates()
  
  // Run functions in parallel on each client:
  for each sClient in lsClients
    spawn
      // Make client do some work:
      [sClient] PerformClientActivity()
    rendezvous

  // Perform end-of-session processing on server application:
  [sServer] DoServerAdministration()