03-25-2008 04:16 PM
Locals.result= (Step.Result.Status =="Passed")
But the Step.Result.Status apperently doesn't update until after the post-expression. It's not a big deal, there are many ways around it; get the PreviousStep.Step.Result.Status in the next step, use a Pass/Fail test instead, etc...
I just thought there would be an easier way to get a boolean result directly from a Numeric Limit Test step itself. If anyone knows how...let me know.
03-25-2008 05:35 PM
03-25-2008 05:48 PM
Hi John,
Solution 1.
What about using the PostResultListEntry Callback? Do a wrapper inside it and filter the NumericLimitTest. Now you can do your boolean result.
Solution 2. (I have not tested this ! just theory)
Copy the stuff from StatusExpression to PostExpression and do a string compare around it
Locals.bResult = (StrComp( CheckLimits(Step.DataSource == "Step.Result.Numeric" ? Step.Result.Numeric : (Step.Result.Numeric = Evaluate(Step.DataSource)), Step.Limits.High, Step.Limits.Low,Step.Comp),"Passed") == 0 ) ? True : False
Solution 3.
Create your own step-type derived by Ni's one.
Now you can define your own Status exepresion.
Hope this helps
Greetings
Juergen
03-26-2008 10:23 AM - edited 03-26-2008 10:29 AM
03-26-2008 02:04 PM
Thanks for the responses. As I stated in my original post, I didn't really want to use a second step nor do anything 'extra' like creating a custom step. So AllenP's solution and j_dodek's Solution 2 were what I was looking for.
j_dodek, your Solution 2 does work. But.....man..is that ever an ugly looking expression!
So I did some trial and error and actually kind of used peices of both ideas and in the end came up with this:
Locals.result=(Evaluate(Step.StatusExpression) =="Passed")
How easy! I can't believe I couldn't come up with that on my own before. It works and its simple so if anyone else looks at my sequence they can figure it out. Now I can easily get a boolean result directly from the post expression of my Numeric Limit Test steps. Thanks again for the responses.
03-26-2008 02:39 PM