NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

message popup to pre-fail next step in sequence

The sequence will test two ethernet ports that have a cable between them.  The first step is to determine if they have link (i.e. link LED).  If they don't, then the test should fail before it is even run.  If their is link, the test should run normally.

I have a message popup that asks the user for feedback.  Specifically - "Are the link LEDs ON?" with a Yes and No buttons response.  The next step of in the sequence needs to determine which button has been clicked.  This part I am able to do.  However, I am only able to get the test to be "skipped" if the NO button was clicked by using a preconditon of RunState.Sequence.Main["ID#:Hp0x2Ctt3USdKXh0uiSOLD"].Result.ButtonHit == 1.  How do I get test to actually fail (so there is a failure in the report).  I have attached the sequence.

Thanks in advance.

0 Kudos
Message 1 of 3
(3,430 Views)
You don't need an additional Step to do this.  In the Message Popup step, you can configure the Status Expression field to be "Step.Result.ButtonHit==1?"Passed":"Failed".  The step will pass if the 1st button was hit, and fail if any other button was hit.  This might give you more useful information (LED Visual Inspection Step Fails vs. Test Fails).

If you still want to use an additional step to do this, the easiest way to do this is if the next step is if the additional step is a Pass/Fail test.  In this case, you can change the DataSource property of the step to be "Step.Result.PassFail &&  RunState.Sequence.Main["Message Popup"].Result.ButtonHit == 1".

I would recommend the first approach, but the second approach can be done as well.


Allen P.
NI
0 Kudos
Message 2 of 3
(3,427 Views)
That is exactly what I needed.  Thanks for the help!
0 Kudos
Message 3 of 3
(3,405 Views)