Hi,
We have instrumented a method to capture a return value. Now i see that method is getting executed multiple times in a PP and each time it has different value it is returning. But i am interested in only one of the return values. Is it possible to capture only one specific execution based on where this method is executed, etc (for example the previous method is always a particular method). I am guessing it is not possible. But just want to double check with the experts.
Answer by Venkata T. ·
Thank you guys for your responses. We are thinking of going with a dummy method approach. But just wanted to check before doing that.
Thanks again,
Answer by Rick B. ·
Hi,
I once asked this same thing, here is what Andi Grabner from our Lab told me:
There is no option to say that you want to take the arguments from 2nd or 3rd method invocation Any chance you can capture the value you are interested in from a different method call - one that is only called for the right message? |
---|
The workaround we had to do was have the developers create a "stub" or "dummy" method which was only invoked once and which held the correct value.
P.S. If you're lucky enough that the instance of the return value that you want is from the first method invocation, you can configure the Methods - Return Value measure you've created to evaluate for the first occurrence on the PurePath only.
Answer by Herwig R. ·
The only one thing I can imagine is to use a BT for example filtering the invocation of a specific method and use for the return value the first (==1st occurrence on the PP) of last (for the last one). It is not possible to use the return value of the first occurrence where another method has been called before (because the calculated value looks on the complete PP again).
JANUARY 15, 3:00 PM GMT / 10:00 AM ET