I try to use the thread context but it can't get the test plan
variables, but it can  get user defiend variables by ${port}.

Thank you for your help.

2011/11/10 Bruce Ide <[email protected]>:
> In my sampler I'm getting a JMeterThreadContext and then getting the
> variables hash from that;
>
> JMeterContext context = getThreadContext();
> JMeterVariables vars = context.getVariables();
>
>
> Then you can just use vars.put as you would inside a beanshell sampler
>
> vars.put("foo", "bar");
>
> You can also put object references into variables. You can browse any of my
> source online at https://github.com/FlyingRhenquest if you need concrete
> examples. Or just dig around in the JMeter source code (That's what I did
> :-)
>
> --
> Bruce Ide
> [email protected]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to