Programmatically Set the Number of Test Sockets in TestStand

Updated Dec 11, 2025

Environment

Software

  • TestStand

I'm using a parallel process model (such as Batch Model.seq or Parallel Model.seq) to execute my sequence file.

I know that the number of test sockets can be set from Configure»Model Optionsby setting Number of Test Sockets property.

Can this be done programmatically?

You can programmatically set the number of test sockets by overriding a Process Model Callback sequence  named Model Options. To accomplish this, you should follow these steps:

  1. Ensure that a multithreaded process model (such as BatchModel.seq or ParallelModel.seq or a customized version of these process models) has been selected for execution. You can set a default process model for the test station from Configure»Station Options»Model»Station Model or you can specify a particular process model for a specific sequence file.
  2. Open your client sequence file
  3. Right-click Sequences Pane and select Sequence File Callbacks... to access Sequence File Callbacks dialog box
  4. Highlight ModelOptions Model Callback and click Add, then click OK
  5. Highlight ModelOptions sequence in Sequences Pane. This model callback provides a series of Parameters, defined by the process model. ModelOptions.NumTestSockets defines the number of test sockets:

  1. Drag and drop a new Statement step in the Steps pane and insert the following expression: Parameters.ModelOptions.NumTestSockets=N     (replace N with the desired number of test sockets. N can be replaced with a variable if the value needs to be obtained from another sequence, callback, or defined programmatically during runtime)
  2. You will get a sequence file similar to what is shown below:
  1. Execute your sequence file by clicking Execute»Test UUTs