07-30-2012 03:10 PM
I load my limits from a text file using property loader. It updates an array in FileGlobals.
All my tests have limits defined like this (using Limits Tab):
(1)
Low FileGlobals.GF_TestSpec.step_0101.LimitLo
High FileGlobals.GF_TestSpec.step_0101.LimitHi
I am using the following post-expression (index expression is simplified for this example):
(2)
FileGlobals.Results[0].LL[index]= Str(Step.Limits.Low),
FileGlobals.Results[0].HL[index]= Str(Step.Limits.High)
The first ttime it runs my limits are 0,0, the second time and third etc.. they are correct (27-32) as in the text file.
I am assuming the assignment (1) does not take place until actual status expression is evaluated and post-expression is executed before that. Any ideas how to fix this? It is a 300+ tests sequence, already in production. Remote access is my only option so I would not want to rewrite it.
Thanks
CT
Solved! Go to Solution.
07-31-2012 09:15 AM - edited 07-31-2012 09:21 AM
You could change your post expression to also evaluate the expressions. Something like the following:
FileGlobals.Results[0].LL[index]= Str(Evaluate(Step.Limits.LowExpr)),
FileGlobals.Results[0].HL[index]= Str(Evaluate(Step.Limits.HighExpr))
This will be ok as long as there is no side effects from evaluating your expressions twice. If they are just specifying variables it should be ok.
Another idea is to load limits directly into the steps rather than in file globals and not specify the limits by expression, rather, let the properly loaded load their values.
Hope this helps,
-Doug
07-31-2012 10:15 AM
Hi Doug,
That is brilliant!. It was a long shot, I did not expect anybody to analyze my cumbersome example. Thanks a lot for your help.