NI TestStand

Showing results for 
Search instead for 
Did you mean: 

To run only the selected sequence steps

Go to solution

Hello. Good evening

There are 15 sequence procedures inside one seq file.

Depending on the user, I want to make sure that only some of the selected sequences are capable of performing them, rather than checking all 15 sequences, but I can't find any example files at all.

I'd really appreciate it if you could give me some reference materials or help

0 Kudos
Message 1 of 3
Accepted by topic author Seto311

You can use TestStand API expressions to evaluate certain criteria, and use that as a precondition to the steps you want to skip.


You must make sure that User Privilege Checking is enabled in your Station Options (Station Options»User Manager»Check User Privileges)



For example, if you wanted TestStand to automatically skip certain steps based on the user's privilege level, you could first obtain flags that indicate the user's permissions:
Statement Step

Locals.Operator = RunState.Engine.CurrentUserHasPrivilege("Operate"),
Locals.Technician = RunState.Engine.CurrentUserHasPrivilege("Debug"),
Locals.Developer = RunState.Engine.CurrentUserHasPrivilege("Develop"),
Locals.Admin = RunState.Engine.CurrentUserHasPrivilege("Configure")


Then, using each of those flags as preconditions in your steps, you can make them run/skip depending on the user's privileges:

Precondition (Run this step if the user is an Operator OR a Technician

Locals.Operator || Locals.Technician


I have attached an example sequence file showing how this works

Systems Engineer
Testeract: Automated Test Specialists
Message 2 of 3