You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Duc Chau <ch...@gmail.com> on 2011/01/14 01:10:44 UTC

global variable for all test plans (jmx)

Hello,

I intend to use csv data set as global variable for all test plans (e.g.
same server ip in case it changes, we just need to update csv). Is there any
other ways to manage global variable across all test plans? Thank you.

Re: global variable for all test plans (jmx)

Posted by Duc Chau <ch...@gmail.com>.
Thank Sebb,

For those who do not want to spend time for searching

1. Add to variable_name = value to jmeter, user or user-defined properties
file (remember to restart Jmeter to get it affected if using GUI)
2. Get value in config element, sampler, etc. by ${__P(variable_name)}

More details:
http://jmeter.512774.n5.nabble.com/JMeter-Experiences-mostly-around-properties-and-variables-td529043.html

On Fri, Jan 14, 2011 at 11:27 AM, sebb <se...@gmail.com> wrote:

> On 14 January 2011 00:10, Duc Chau <ch...@gmail.com> wrote:
> > Hello,
> >
> > I intend to use csv data set as global variable for all test plans (e.g.
> > same server ip in case it changes, we just need to update csv). Is there
> any
> > other ways to manage global variable across all test plans? Thank you.
>
> Properties might be more suitable for items that are fixed for an entire
> test.
>
> I.e. use the property to set the value of a variable rather than
> reading from a CSV file.
>
> You can provide additional property files on the command line.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

Re: global variable for all test plans (jmx)

Posted by sebb <se...@gmail.com>.
On 14 January 2011 00:10, Duc Chau <ch...@gmail.com> wrote:
> Hello,
>
> I intend to use csv data set as global variable for all test plans (e.g.
> same server ip in case it changes, we just need to update csv). Is there any
> other ways to manage global variable across all test plans? Thank you.

Properties might be more suitable for items that are fixed for an entire test.

I.e. use the property to set the value of a variable rather than
reading from a CSV file.

You can provide additional property files on the command line.

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