Create a New SequenceCall Step and Modify Its Properties with the TestStand Engine API

Updated May 2, 2018

Reported In

Software

  • TestStand

Issue Details

I am dynamically adding steps to my sequence file with the TestStand engine API and I want to create a SequenceCall step that calls a sequence by name.

Solution

Here is one way to create a SequenceCall step and dynamically set some properties:

Locals.NewStepRef = RunState.Engine.NewStep(RunState.Engine.DefaultAdapter, StepType_SequenceCall),
Locals.NewStepRef.AsSequenceCallModule.UseCurrentFile = True,
Locals.NewStepRef.AsSequenceCallModule.SequenceName = "MySequenceName"


Where Locals.NewStepRef is an Object Reference.

Additional Information

TestStand Object References have API methods in the form of As<object type> to convert the generic object to a more specific type. In the above example, Locals.NewStepRef is an Object Reference that needs to be cast to a SequenceCallModule object with the AsSequenceCallModule method. This exposes the properties and methods specific to the SequenceCall step.

WAS THIS ARTICLE HELPFUL?

Not Helpful