jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thibaut Raballand <thibaut.raball...@gmail.com>
Subject Re: Setting jmeter variables in runtime
Date Wed, 13 Jan 2010 12:09:51 GMT
Hi,

You can easily create or modify a variable with a beanshell sample placed
anywhere in the script. Variable creation or modification will be done when
the sample will be executed, as for beanshell preprocessors or
postprocessors.

Beanshell Code:
vars.get("VARIABLE_NAME");
vars.put("VARIABLE_NAME","whatYouWant");

You can also use BSF samples or many other samples...

What exactly is your need ? I hope I'm not getting your need wrong.

Regards,
Tibo

On Wed, Jan 13, 2010 at 12:00, Andrey Pohilko <apc@fininfor.ru> wrote:

> Hi,
> I have a question - how can I use function in test plan to set variable "in
> runtime"? Which component type I should use to do that?
> Especially I'd like to define variable in one place and later redefine this
> variable value in another.
> I've experimented with pre-processors, but it's unapplicable, because of
> scope requirement. I need something like "Runtime User Defined Variables"
> in
> my plan, which processed like Controller items - in their order.
>
> I even tried to write my own Controller plugin, which will do this, but
> stuck with variables and function evaluation approach in code. (Maybe sebb
> can help me with this ;)
>
> Best regards,
> Andrey Pohilko
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message