jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "BAZLEY, Sebastian" <sebastian.baz...@atosorigin.com>
Subject RE: Nested variables?
Date Thu, 15 Apr 2004 14:48:37 GMT
[Repost]

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
properties.]

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

jmeter -Jhost=my.prodserver.dns ...
or
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
${__P(host)}.

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

http://wiki.apache.org/jakarta-jmeter/JMeterFAQ#head-2bd2acc0ddc4dc65e9aad08
6b024ff6b81bd751b
and
http://wiki.apache.org/jakarta-jmeter/JMeterFAQ#head-0e27602a04ca6ec2c9f5f7b
0d7d26de80b1a960c

Sebastian
-----Original Message-----
From: Michael Stover [mailto:mstover1@apache.org]
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.

-Mike

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 
> (http://log4ls.sourceforge.net), a LotusScript port of Log4J and my 
> DominoAppender , NotesExceptionRenderer and DominoConfigurator to use 
> with Log4J and Domino.
> 
> Thanks,
> 
> Johan Känngård
> johan@kanngard.net
> http://dev.kanngard.net/
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
-- 
Michael Stover <mstover1@apache.org>
Apache Software Foundation


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


___________________________________________________________________________

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: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Mime
View raw message