NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Post Action does not work

Hi,

I'm trying to accomplish a very simple task.
a) Check that few StationGlobals are not empty
b) If they are empty display a message box, indicating to user to do something
c) Terminate the test.

I created a Message Popup, use (a) as a precondition and tried to call for termination in the Post Action part of the step.

Post Action details:
-- Specify Custom Condition
-- expression: Step.Result.ButtonHit == 1 (The message popup has only 'OK' button.)
-- On condition True - terminate Execution (or goto destination )

It does not work. After investigating, I realized that the result status is performed AFTER the Post Action. Is this correct?

How do you suggest to accomplish this task?

Thanks
Rafi
0 Kudos
Message 1 of 5
(3,151 Views)
Hi Rafi,

Yes that is correct.

You could use the Goto step that has the precondition that jumps to a label if ok or continues on to the next step(s)to do your dialog. with a final goto step that continues if ok or terminates.

If you are using TestStand 3.1 you could make use of the IF/ELSE steps types.

Regards
Ray Farmer
Regards
Ray Farmer
Message 2 of 5
(3,145 Views)
Thanks Ray,

I used your advice and it's working fine. However, when it GoTo End (or Cleanup) it still go through the rest of the sequence model including the database logging and I find myself putting effort preventing that.

Is that the way to do it, or, is there a way to just Terminate/Abort the test?

Thanks
Rafi
0 Kudos
Message 3 of 5
(3,136 Views)
Hi Rafi,

I was working from memory and I thought with the Goto step you could Terminate as well as goto Cleanup or End. Obviously memory not that hot.

Instead of using the last Goto step. Use a None Adapter with its Custom post action set to True and the True action control set to Terminate. Use the precondition on this step to invoke the step depending on whether the user pressed the Terminate button on your MessagePopup.

That should do the trick.
Regards
Ray Farmer
Regards
Ray Farmer
0 Kudos
Message 4 of 5
(3,128 Views)
Thank you very much

It's working great!!
0 Kudos
Message 5 of 5
(3,119 Views)