Does the same testplan work if you execute it from command line using
the commandline switches to override the property?  If not, you could
simply have a typo like an extra space, case mismatch, etc.

I think you see an error in the jmeter.log if it sees what it considers
an invalid URL (for instance if the property were not substituted right
and didn't look like a hostname).  Check there to see what is used.
Attach a debug sampler to the http request see what your property values
really are.

Make your testplan work as intended.. Then toss the jmeter-ant stuff on
top.

-Steve

-----Original Message-----
From: Joe Kramer [mailto:[EMAIL PROTECTED] 
Sent: Monday, May 05, 2008 10:28 AM
To: JMeter Users List
Subject: Re: Jmeter Ant task: how to test on multiple site with HTTP
Request Defaults?

I insert ${__P(propertyname)} into "host field in Jmeter UI and then
save the test file.
Then run it with jmeter-ant and pass the parameter <property
name="propertyname" value="localhost"/> In test results Jmeter says
"Connection refused" so it probably tries to connect to address "${(..."
and variable is not replaced.

What am I doing wrong? Can I make it work?

On Tue, Nov 20, 2007 at 7:31 PM, sebb <[EMAIL PROTECTED]> wrote:
> Just use the appropriate property in the test element.
>
>  e.g. ${__P(propertyname)}
>
>
>
>  On 20/11/2007, Joe Kramer <[EMAIL PROTECTED]> wrote:
>  > I mean parameter for Jmeter to set HTTP request defaults.
>  > Documentation mentions only this:
>  >
>  > <jmeter
>  >   ... >
>  >       <property name="request.threads" value="1"/>
>  >       <property name="request.loop" value="10"/>
>  > </jmeter>
>  >
>  >
>  > On 11/19/07, sebb <[EMAIL PROTECTED]> wrote:
>  > > For
>  > >
>  > >             -Dtest.host=something
>  > >
>  > > use
>  > >
>  > >        <property name="test.host" value="something"/>
>  > >
>  > >
>  > > On 19/11/2007, Joe Kramer <[EMAIL PROTECTED]> wrote:
>  > > > I did read that, but what is the property for "HTTP sampler 
> request  > > > defaults host" ? request.host?
>  > > >
>  > > > On 11/19/07, sebb <[EMAIL PROTECTED]> wrote:
>  > > > > From the JMeter Ant doc in extras/ directory:
>  > > > >
>  > > > > "You can override JMeter properties (instead of modifying  > 
> > > > jmeter.properties) like this:
>  > > > >
>  > > > > <jmeter
>  > > > >     jmeterhome="c:\jakarta-jmeter-1.8.1"
>  > > > >     testplan="${basedir}/loadtests/JMeterLoadTest.jmx"
>  > > > >     resultlog="${basedir}/loadtests/JMeterResults.jtl">
>  > > > >         <property name="request.threads" value="1"/>
>  > > > >         <property name="request.loop" value="10"/>
>  > > > > </jmeter>
>  > > > > "
>  > > > >
>  > > > > On 18/11/2007, Joe Kramer <[EMAIL PROTECTED]> wrote:
>  > > > > > Hello,
>  > > > > >
>  > > > > > How can we configure HTTP Request defaults in Jmeter ant
task?
>  > > > > > This is needed for example if you have multiple hosts and 
> want to use  > > > > > same JMX file running against different hosts.
>  > > > > >
>  > > > > > I imagine it should work like this: you pass 
> -Dtest.host=something.com  > > > > > to Ant and then use this variable

> in Jmeter ant task. But how to pass  > > > > > that into Jmeter Ant
task is not described.
>  > > > > >
>  > > > > > Thanks.
>  > > > > > Joe.
>  > > > > >
>  > > > > > 
> ---------------------------------------------------------------------
>  > > > > > To unsubscribe, e-mail: 
> [EMAIL PROTECTED]
>  > > > > > For additional commands, e-mail: 
> [EMAIL PROTECTED]
>  > > > > >
>  > > > > >
>  > > > >
>  > > > > 
> ---------------------------------------------------------------------
>  > > > > To unsubscribe, e-mail: 
> [EMAIL PROTECTED]
>  > > > > For additional commands, e-mail: 
> [EMAIL PROTECTED]
>  > > > >
>  > > > >
>  > > >
>  > > > 
> ---------------------------------------------------------------------
>  > > > To unsubscribe, e-mail: 
> [EMAIL PROTECTED]
>  > > > For additional commands, e-mail: 
> [EMAIL PROTECTED]
>  > > >
>  > > >
>  > >
>  > > 
> ---------------------------------------------------------------------
>  > > To unsubscribe, e-mail: 
> [EMAIL PROTECTED]
>  > > For additional commands, e-mail: 
> [EMAIL PROTECTED]
>  > >
>  > >
>  >
>  > 
> ---------------------------------------------------------------------
>  > To unsubscribe, e-mail: [EMAIL PROTECTED]
>  > For additional commands, e-mail: 
> [EMAIL PROTECTED]
>  >
>  >
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to