Variables not being replaced?

2011-09-22 Thread Bruce Wobbe
I have a jmeter HTTP request where I define the server to be ${TestServer}
I then pass the variable via ant with the server I want to use
property name=TestServer value=192.168.1.2/
However when I run the test the substitution doesn't seem to happen I get
this in the jtl
  responseData class=java.lang.Stringjava.net.UnknownHostException:
${TestServer}

In the jmeter log I do see the variable come about but it seems to not do
the substitution

2011/09/22 13:50:07 INFO  - jmeter.JMeter: Setting JMeter property:
TestServer=192.168.1.2

2011/09/22 13:50:08 DEBUG - jmeter.engine.util.ValueReplacer: About to
replace in property of type: class
org.apache.jmeter.testelement.property.StringProperty: ${TestServer}
2011/09/22 13:50:08 DEBUG - jmeter.engine.util.ValueReplacer: Replacement
result: ${TestServer}

Am I doing this wrong? What is the issue here?

Thanks

Bruce


Re: Variables not being replaced?

2011-09-22 Thread Bruce Ide
To pull java properties into jmeter variables you have to use the __P
function. Try making a user defined variable config element with TestServer
defined, and make its value ${__P(TestServer,)}

The value after the comma is a default, so if you have a default test server
you want to use if the property isn't defined, you can put it in there.

-- 
Bruce Ide
flyingrhenqu...@gmail.com


Re: Variables not being replaced?

2011-09-22 Thread Bruce Wobbe
Yep, thanks I figured this out right after I sent the email

Bruce

On Thu, Sep 22, 2011 at 2:16 PM, Bruce Ide flyingrhenqu...@gmail.comwrote:

 To pull java properties into jmeter variables you have to use the __P
 function. Try making a user defined variable config element with TestServer
 defined, and make its value ${__P(TestServer,)}

 The value after the comma is a default, so if you have a default test
 server
 you want to use if the property isn't defined, you can put it in there.

 --
 Bruce Ide
 flyingrhenqu...@gmail.com