jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "BAZLEY, Sebastian" <>
Subject RE: Nested variables?
Date Thu, 15 Apr 2004 14:48:37 GMT

However, you can use function names in parameters to functions.

So you could have a set of text files for use by __CSVRead() or
_StringFromFile() and pass in the file name (or part of it) at run-time.


If there are only a few variables, it is probably simpler to define the
properties on the command-line.

We use this for varying loop-count, thread-count and ramp-up [and some other

In your case, it looks like you could just pass in the host name, e.g.

jmeter -Jhost=my.prodserver.dns ...
jmeter -Jhost=my.devserver.internal.dns ...

This can be accessed using the __P() function.
You can use __P() to set a HOST variable in the appropriate config element
and then refer to ${HOST} elsewhere. This is a bit tidier than using

There is some information in the FAQ on parameterising test runs:

-----Original Message-----
From: Michael Stover []
Sent: 14 April 2004 13:45
To: JMeter Users List
Subject: Re: Nested variables?

Basically, no.  You can't parameterize the names of functions.  I'd
think your best option would be to have multiple versions of a User
Defined Variables element and swap them in and out of your tests.


On Wed, 2004-04-14 at 07:04, Johan Känngård wrote:
> Hi
> I have been using JMeter for a couple of weeks, and it really rocks!!
> Is it possible to have nested variables, like ${host_${environment}}, so > that i
can have a "User Defined Variables"-element like this:
> host_dev=my.devserver.internal.dns
> host_test=my.testserver.internal.dns
> host_prod=my.prodserver.dns
> enviroment=dev
> host=${host_${environment}}
> or is there another way of acomplish this? Tried to search the archives, > but I haven't
found anyone with the same question.
> The example above is very simple, but my setup is quite complex, since I > am testing
an HTTPS application in different environments, with 
> different variables but the same "flow".
> Off topic: Who Am I?
> Johan Känngård, works in Stockholm, Sweden, IBM/Lotus developer since > 1997, knows
things like Java, XML, XSL, CSS, JavaScript, LotusScript, 
> VB.NET and C#. Among things I've created are  Log4LS 
> (, a LotusScript port of Log4J and my 
> DominoAppender , NotesExceptionRenderer and DominoConfigurator to use 
> with Log4J and Domino.
> Thanks,
> Johan Känngård
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:
Michael Stover <>
Apache Software Foundation

To unsubscribe, e-mail:
For additional commands, e-mail:


This e-mail and the documents attached are confidential and intended solely
for the addressee; it may also be privileged. If you receive this e-mail in
error, please notify the sender immediately and destroy it. As its integrity
cannot be secured on the Internet, the Atos Origin group liability cannot be
triggered for the message content. Although the sender endeavours to maintain
a computer virus-free network, the sender does not warrant that this
transmission is virus-free and will not be liable for any damages resulting
from any virus transmitted. 

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message