Hi
though the post processors will be executed in order , I believe the
beanshell script will be parsed first to replace all the ${} references so
you will see the behavior you are seeing - i.e. since the variable does not
exist at the time the script is parsed, you cant use it. You should
probably remodel your case to use a pre processor on the next sampler - or
just use java objects inside BSH rather than the functions

regards
deepak


On Tue, May 21, 2013 at 12:13 PM, [email protected] <[email protected]>wrote:

> Thanks Shetty for the sample code.
>
> I tried to compare my code snippet with yours and I found some interesting
> stuff.
>
> Thread-group
> |-HTTP sampler
> |   |-RegEx extractor
> |
> |-BeanShell sample
>
>
> Thread-group
> |-HTTP sampler
> |   |-RegEx extractor (to extract accountIds, this extractor creates the
> accountId_matchNr variable)
> |   |-BeanShell Postprocessor (which tries to access accountId_matchNr in
> the script, and fails)
>
> When I tried to put the same logic in the BeanShell sample after first
> sampler, it does work. So this raises one question that the order of
> execution of post-processor is not followed in the sequence extractor are
> defined. I think BeanShell postprocessor is executed earlier than the RegEx
> extractor and that is why it is not able to find the accountId_matchNr
> value
> throws exception.
> If you have different thought on this then please share here.
>
>
>
> --
> View this message in context:
> http://jmeter.512774.n5.nabble.com/passing-variable-in-Random-method-call-in-Beanshell-tp5716932p5716947.html
> Sent from the JMeter - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to