08-01-2013 01:37 PM
Hi all,
I have a question about Multiple Numeric Limit Test.
My data source is an array tab1[ ].
I need to compare each item of tab1[ ] with the associated item in another array tab2[ ].
In other words, I would like to check wether tab1[i] > tab2[i] (for i = 0 ; i > 32 ; i++)
Simple problem isn't it ? However, I can't find any efficient solution to specify my "Low Limit" expression ! ^^
To be more precise, I have to say that I don't want to create 32 different "Low Limit" expressions (Low Limit A = tab2[0] , Low Limit B = tab2[1] , etc... would be a bad solution). I would like to create a single expression that would be able to handle all the comparisons at the same time. Is it possible ?
Thank you very much for any help !
Solved! Go to Solution.
08-02-2013 09:49 AM
I think the easiest thing to do in this use case would be to use a regular numeric limit step with loop settings enabled. Your data source would be set to something like:
Locals.tab1[RunState.LoopIndex]
And the comparison type would be GT with the low limit set to:
Locals.tab2[RunState.LoopIndex]
You can set the loop settings on the step to "Fixed number of loops" with 32, or you can use custom loop type based on fixed number of loops with the Loop While expression set to something like:
RunState.LoopIndex < GetNumElements(Locals.tab1)
Hope this helps,
-Doug
08-02-2013 03:11 PM
Thank you very much for your help Doug. OK for your solution ! 🙂
I understand by reading your answer that using the "Multiple Numeric Limit Test" is not so easy in my use case. So your solution is good, but let me explain what I have done to solve my problem (I'm OK with your solution but I'm a beginner with TS and I would like to improve, so I try to use different techniques to solve my problems) :
> I added a "Statement" step just before the "Multiple Numeric Limit Test" step.
> In this "Statement" step, I use TS API to create dynamically the 32 measurements of the "Multiple Numeric Limit Test" step, and it works very well.
> The only problem is the report generated : for each measurement, there are my results but there are also information that I do NOT want to log ! ^^ For instance, the expressions that I use for calculating Low and High Limits are logged into the report (!). Those information are not logged when I don't create the 32 measurements dynamically. So I tried to use SetFlags() function of TS API to set the "Include In Report" flag to false. But the expressions remain in the report. Any idea ? (maybe I should create another topic ?)
08-02-2013 05:26 PM
Use PropFlags_DontCopyToResults instead of PropFlags_IncludeInReport. If you create the measurements with the UI and then look at their flags in the variables view (e.g. Step.Result.Measurement["Measurement 0"].Limits.HighExpr), you will see that it's using the PropFlags_DontCopyToResults flag.
-Doug
08-05-2013 02:36 AM
Merveilleux ! You're right.
Thank you again for your help.
J.