You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Ch...@westfieldgrp.com on 2003/10/01 21:18:22 UTC
Getting a string from an environment variable?
Is there a way to get an environment variable with in jmeter as a script is
executing?
I don't mean a variable in the jmeter properties file.
Is there a javascript I can use, or something else.
Thanks,
Chris
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: Getting a string from an environment variable?
Posted by Sebastian Bazley <Se...@london.sema.slb.com>.
Not that I know of, because Java does not give access to environment variables.
[But it's possible that JavaScript gives access.]
One can easily edit the script that starts JMeter to pass in the value of an environment variable as a property.
e.g. on Windows:
java ... -jar ApacheJMeter.jar -Dmyprop=%ENVVAR%
or *nix
java ... -jar ApacheJMeter.jar -Dmyprop=$ENVVAR
The property can then be read using the __property() function.
S.
----- Original Message -----
From: <Ch...@westfieldgrp.com>
To: "JMeter Users List" <jm...@jakarta.apache.org>
Sent: Wednesday, October 01, 2003 8:18 PM
Subject: Getting a string from an environment variable?
Is there a way to get an environment variable with in jmeter as a script is
executing?
I don't mean a variable in the jmeter properties file.
Is there a javascript I can use, or something else.
Thanks,
Chris
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org