NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Pragmatically change the requirements of a step based on UUT serial number

Solved!
Go to solution

Hi,

 

I am new to the test stand. I was given a task to add one more UUT serial number to an existing test solution. Basically the test solution is same. But the requirements tags needs to be changed in the report since they are different for new serial number.

 

For example,

 

I have tags Requirement_1 for UUT_SN1 and Requirement_2 for UUT_SN2 for the same test sequence. I need to pass the Requirement_1 or Requirement_2 based on UUT selection to the report while executing the test sequence.

 

Can anyone help in doing this?

0 Kudos
Message 1 of 3
(2,323 Views)
Solution
Accepted by topic author VivekPV

Hello VivekPV,

 

expressions can be used like

 

SetNumElements (Step.TS.Requirements.Links, 1),
(RunState.Root.Locals.UUT.SerialNumber=="Test") ? (Step.TS.Requirements.Links[0] = "Test") : (Step.TS.Requirements.Links[0] = "No Test")

 

Now you have to insert the expression on the position, where the decision was done, to modify the report. In the example the requirements property from the step was changed based on the serial number.

 

On how many positions must the change done, have you an example?

 

 

best regards
Alexander
0 Kudos
Message 2 of 3
(2,278 Views)

Thank you.

This works perfectly. I used the expressions as the 'pre-expression' for the sequences.

 

0 Kudos
Message 3 of 3
(2,252 Views)