You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Felix Frank <ff...@mpexnet.de> on 2010/08/04 14:42:09 UTC

Weird BeanShell PostProcessor effect

Hi,

I need to determine the remote host name using BeanShell before the
first sampler is executed. A HTTPRequestDefaults element sets the server
name to ${TARGET}, while a BeanShellPreProcessor performs
vars.put("TARGET","...").
This works, but during the first loop through the test plan, the
HTTPRequestDefaults set the host name to a literal ${TARGET}.

That, in and of itself, would be understandable. It gets weird once I
insert a Debug Sampler though, because then, it suddenly works even
during the first pass.

What's wrong here and can I make this work after all?

Cheers,
Felix

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: Weird BeanShell PostProcessor effect

Posted by Deepak Shetty <sh...@gmail.com>.
i dont know what behavior you are seeing and its hard to tell without
knowing the structure of your script.
However in cases like this , I usually have a separate Thread Group that
sets up stuff and then use properties to get that information to the next
thread group



On Wed, Aug 4, 2010 at 5:42 AM, Felix Frank <ff...@mpexnet.de> wrote:

> Hi,
>
> I need to determine the remote host name using BeanShell before the
> first sampler is executed. A HTTPRequestDefaults element sets the server
> name to ${TARGET}, while a BeanShellPreProcessor performs
> vars.put("TARGET","...").
> This works, but during the first loop through the test plan, the
> HTTPRequestDefaults set the host name to a literal ${TARGET}.
>
> That, in and of itself, would be understandable. It gets weird once I
> insert a Debug Sampler though, because then, it suddenly works even
> during the first pass.
>
> What's wrong here and can I make this work after all?
>
> Cheers,
> Felix
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>