Loading Property Groups Programmatically Using Property Loader in TestStand

Updated May 15, 2023



  • TestStand

I am trying to upload variables in different groups using the TestStand property Loader Step. I created a file for some variables I have by exporting them to a Excel file. See the image below for an example of the file I am loading. My file has two groups.

Figure 1. An .xls file showing exported variables in two groups: "Group 1" and "Group 2".

I want to be able to select which group I want to import using the property loader. Ultimately, I want to select this group programmatically.

Using the Property Loader UI

  1. After placing a Property Loader Step, configure the step to point to the file you want to import by defining the Source Location in the Step Settings.
  1. Under Target File and Source Settings press the blue arrow to Load the Source Prototype.
  1. Next, press the Property Selector Dialog button to open the Property Selector
  1. In the Property Selector window, select the group you want to load by putting a check mark next to it.
  1. When the step runs, it will load the group you want to load.

Selecting a Group Programmatically in TestStand 2016 SP1 and Later

  • You can use a group's Precondition property to select which property to use. If the group's precondition is true, it will be selected for loading.
  • Use the “$(GroupName)” and “S(GroupId)” macros in the expression to denote the name and ID of a group in the Precondition property.
    • In the example above, I could set the precondition to look at a string local called NameOfGroupToUse and see if that local is equal to "$(GroupName)".

Selecting a Group Programmatically in TestStand 2016 or Earlier

  • In 2016 or earlier, the Precondition property does not exist.
  • There are several alternative methods that could be created, one of which is to create separate files for each variable group and programmatically define the file path that the property loader will load.