NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

customizing test step types

I'm wanting to add some custom step types such that they're seen when I right-click (in TestStand) in a sequence and select "Insert Step",  So right now, when I do this, I see "Tests" and "Action", then "Sequence Call", then "Statement", etc.  There is a little grouping bar between 'Action' and 'Sequence Call'.  What I would like to do is add some custom step types above 'Tests' and 'Action' that would be in their own grouping. 

 

I noticed that TestExec.ini has some of the information I'm looking for, i.e. TypeGroups[1] below, but I'm thinking that I'm not supposed to directly modify this file (or am I?).  What's the best way to go about this cusomization?

 

[DEF, Config.TypeGroups[0]]
ForSubsteps = Bool
SuperGroup = Str

[DEF, Config.TypeGroups[1]]
SuperGroup = Str
IsSubMenu = Bool
DisplayName = Str
Hidden = Bool
Separator = Bool
Types = Objs
%NAME = "Tests"

[Config.TypeGroups[1]]
IsSubMenu = True
DisplayName = "ResStr(\"NI_STEPTYPES\", \"TEST_TYPE_MENU_NAME\") "
%HI: Types = [3]

[DEF, Config.TypeGroups[1].Types]
%[0] = Obj
%[1] = Obj
%[2] = Obj
%[3] = Obj

[DEF, Config.TypeGroups[1].Types[0]]
Hidden = Bool
%NAME = "PassFailTest"

[DEF, Config.TypeGroups[1].Types[1]]
Hidden = Bool
%NAME = "NumericLimitTest"

[DEF, Config.TypeGroups[1].Types[2]]
Hidden = Bool
%NAME = "NI_MultipleNumericLimitTest"

[DEF, Config.TypeGroups[1].Types[3]]
Hidden = Bool
%NAME = "StringValueTest"

[DEF, Config.TypeGroups[2]]
SuperGroup = Str
IsSubMenu = Bool
DisplayName = Str
Separator = Bool
Hidden = Bool
Types = Objs
%NAME = "Action"

[Config.TypeGroups[2]]
DisplayName = "ResStr(\"NI_STEPTYPES\", \"ACTION_MENU_ITEM_NAME\")"
%HI: Types = [0]

[DEF, Config.TypeGroups[2].Types]
%[0] = Obj

[DEF, Config.TypeGroups[2].Types[0]]
Hidden = Bool
%NAME = "Action"

0 Kudos
Message 1 of 4
(2,868 Views)

Hey mrbean,

 

You can right-click the Insertion Palette and click Customize. This will give you options to add a new group, and specify it to be either a submenu or have a separator. You can arrange your custom steps within this screen to change the appearance of either the Insertion Palette or the right-click menu you referred to.

Daniel E.
TestStand Staff Product Support Engineer
National Instruments
CTA/CLD
0 Kudos
Message 2 of 4
(2,865 Views)

I'm in the hunt an peck mode right now and I was able to right-click and add a group/sub-group.  However, when I "Preview Menu" I don' see my selections.  I noticed that if I click on the 'Submenu' box, an 'expression' f(x) appears, and I see THIS (for the Test selection)

 

ResStr("NI_STEPTYPES", "TEST_TYPE_MENU_NAME"). 

 

I'm not seeing my TestExec.ini file getting updated when I add a similar string for my new test group, so I'm wondering what the proper steps are to add actual/working steps?  I'm guessing that TEST_TYPE_MENU_NAME is the name of a constant that I need to define somewhere?

0 Kudos
Message 3 of 4
(2,851 Views)

The ResStr call is loading a TestStand resource string for the Tests name. This is only used for built-in step type folders and isn't necessary for your custom additions. You should just be able to type in a string expression for the name. For example, "My Customized Steps" (with the quotes).

 

Once you've added a group, you can click and drag steps from the list on the Customize screen and put them into your group. After you click OK on the Customize window, you should see the new folder in the Insertion Palette, and a new submenu when you right-click on your sequence and choose Insert Step.

Daniel E.
TestStand Staff Product Support Engineer
National Instruments
CTA/CLD
0 Kudos
Message 4 of 4
(2,848 Views)