05-26-2010 04:25 AM
I'm trying to store the results (pass/fail) of each measurement in a multi numeric limit step type. The adapter I'm using is a <none> since the data exists from previous steps stored in local variables. I'm using a post expression to store the results in an array of Booleans in the local variables. Here is an example of the post expression
Locals.PassFailStatus[1] = Step.Result.Measurement["name"].Status
where "name" is the name of the limit test. This doesn't work and I'm having trouble finding how to access the results of the step. Please help
05-26-2010 08:27 AM - edited 05-26-2010 08:28 AM
You say you're storing the step's status to an array of booleans, but the Status property is a string - something to keep in mind.
The problem you're running into is that when the post-expression executes, Step (in the context of the current step) does not have Status populated yet.
Is there a reason you can't just use Locals.ResultList? You can't look up elements by name but you can by index: Locals.ResultList[2].Status would return the status of the third reporting step in which was executed.
05-26-2010 08:39 AM
I have report generation disabled. I assumed the post expression executed after the step finish execution. not sure how useful that is now. Ideally I'd like to just reference the results list as you stated but I can't figure out how to do that. What's giving me a hard time is I'm using the <none> type adapter since the data and limits exist in properties. I don't know how to access the results of a <none> step type for a multiple limits test.
05-26-2010 09:04 AM
Unfortunately you wont have anything in the ResultsList if you have Record Result disabled.
Regards
Ray Farmer
05-26-2010 09:07 AM
What are you trying to do:
Are you trying to figure out how to get the measurement into your multinumeric limit step so that it can evaluate the limits properly?
Or
Are you trying to get the results of the multinumeric limit step to do something with them afterwards? If so, what are you trying to do with them and why is the normal result list mechanism not sufficient for your purposes?
-Doug
05-26-2010 09:41 AM
05-26-2010 01:45 PM
I would do the following ( if possible ). Remove your Multiple Numeric Limit tests and replace them with Numeric Limit tests ( one for each measurement ). Again, this may not be feasible due to the volume of tests you have may have.
Change the post expression on the new Numeric Limit Test to the following:
Locals.PassFailStatus[0] = (CheckLimits(Step.DataSource == "Step.Result.Numeric" ? Step.Result.Numeric : (Step.Result.Numeric = Evaluate(Step.DataSource)), Step.Limits.High, Step.Limits.Low,Step.Comp) == "Passed" )
I am assuming a 'TRUE' in your boolean array PassFailStatus is Pass test result.
Increment the [Index] within Locals.PassFailStatus[Index] for each test. You could probably set something up programatically to update this index if you do not want to do this by hand.
Thanks,
Paul Holzrichter.