NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

help on post and pre conditions

hello,
 
iam a new use to test stand and having problem in specifying preconditions to a step depending on the message pop up inputs
 
need some help in that regard  a sample code will be very help ful
 
thanks
 
vijay
0 Kudos
Message 1 of 4
(3,254 Views)
Hi,
 
They are some useful examples supplied with teststand in the examples folder. Try CreateDeleteUsers.seq for example. This has a precondition checking if which button has been pressed from step "Select to create or delete user".
 
Maybe you could post a small example sequencefile of what you are trying to achieve.
 
 
 
Regards
Ray Farmer
Regards
Ray Farmer
0 Kudos
Message 2 of 4
(3,250 Views)
thanks ray,

actually i tried using the examples folder but since i use an evaluation version of teststand i dont have many examples in that , im not sure if its the problem of the version or the software that i installed but anyways im giving you the sample code of wat iam trying to do as an attachment to this.

what i actually require is that

the execution of the second step should be accomplished only when the "DELUX" button is clicked in the message pop that comes out initially ,

its only a part of the whole application but this query should clear my whole application


thanks and regards


vijay



0 Kudos
Message 3 of 4
(3,248 Views)

Hi,

In your precondition you are checking for "DELUX" (RunState.ThisContext.Locals.PURCHASE==(\"DELUX\")"),

whereas you have actual filled the variable with "DELUXWASH"
(PostExpr = "Locals.PURCHASE = ((Step.Result.ButtonHit == 2) ?\n\"ECONOMYWASH\" : \"DELUXWASH\")")

 

Also there appears to be a problem with "....== 2) ?\n\"ECONOMYWASH..." you seem to have \n in the expression.

Regards

Ray Farmer


 

Regards
Ray Farmer
0 Kudos
Message 4 of 4
(3,239 Views)