Purpose

This example demonstrates how to programmatically create and execute new test sequences. This example uses an INI file to create new steps and insert them into a new sequence. The example then saves and executes the new sequence file.

Example File Location

<TestStand Public>\Examples\TestStand API\Building a Sequence Using API\TestStand Expressions\Building a Sequence Using API - INI.seq

Highlighted Features

  • TestStand API
  • Flow Control steps

Major API

  • Engine.NewSequenceFile
  • Engine.NewStep
  • Sequence.InsertStep
  • Engine.GetSequenceFileEx
  • Engine.NewExecution
  • Execution.WaitForEndEx
  • Engine.ReleaseSequenceFileEx

Prerequisites

None

How to Use This Example

Complete the following steps to run the example:

  1. Select Execute»Run MainSequence to start the example.
  2. When prompted, select the example INI file. The data in this file will be used to create a new sequence file.
  3. Notice that a new execution is created. This execution is running the dynamically created sequence file.
  4. Open the sample INI file located in <TestStand Public>\TestStand API\Building a Sequence Using API\Common in a text editor. You can modify this file to change the steps in the generated sequence file.