Mike,
I found this tricky to do but here's some notes I made yesterday...
Parameterizing the test plan from the command line - e.g. to run the tests
using url's that point to machine x, port y and context root z - was fiddly
with some documentation referring to properties and default values that is
not in the release version. the method I found that did work requires using
-Jproperty=value arguments on the command line that are used to set user
defined values in a User Parameter pre-processor using the
${__property(propertyName)} function. This appears to be the only approach
that works in 1.9.1. Default values for the JMeter properties can be set in
jmeter.properties. (NOTE: -D seems to be interchangeable with -J on the GUI
command line).
Use the parameters defined in the User Parameter pre-processor either in
the Http Request Default component or in a Http Request sampler. I set the
path in the default component thus ${contextRoot}/query.do which worked
fine.
Invoking the jmeter gui:
jmeter -Dhost=localhost -Dport=8888 -DcontextRoot=/render
or from ANT
<jmeter
jmeterhome="${jmeter.home}"
resultlog="${basedir}/Test/JMeter/results/contabreq.jtl">
<testplans dir="${basedir}/Test/JMeter/testplans" includes="*.jmx"/>
<jvmarg value="-Dhost=${oc4j.machine}"/>
<jvmarg value="-Dport=${oc4j.http.port}"/>
<jvmarg value="-DcontextRoot=${j2ee.context.root}"/>
</jmeter>
Andy
[EMAIL PROTECTED]
nfo.com To: [EMAIL PROTECTED]
cc:
07/01/04 16:18 Subject: RE: How to change context
root in generic manner?
Please respond to
jmeter-user
How do I do this? I don't see anywhere to add this?
And in the test plan I have /application/... in every path for every HTTP
Request. This will need to be changed often.
Do I change every path in every HTTP Request to have ${yourVariable}/... ?
Where do I defined this variable so that it can be easily changed for a
test
on a different context-root?
thx,
Mike
-----Original Message-----
From: Jordi Salvat i Alabart [mailto:[EMAIL PROTECTED]
Sent: Tuesday, January 06, 2004 11:13 AM
To: JMeter Users List
Subject: Re: How to change context root in generic manner?
Unfortunately, the HTTP Request Defaults component can't serve that
function.
But you can define a variable in your test plan having the value
"/application". The proxy recorder will replace every occurence of
"/application" with "${yourVariable}". You'll only need to change the
variable to run with a different context root.
--
Salut,
Jordi.
En/na [EMAIL PROTECTED] ha escrit:
> I have an application that can have multiple context roots. I need to be
> able to change this in one place rather than in every HTTP Request. I
tried
> putting it in HTTP Request Defaults Path but the proxy recorder only
records
> urls that match the path exactly. I would like something that will look
at
> the path as more of a prefix for the rest of the url rather than an
> absolute.
>
> ie:
> http://www.bob.com/application/doSomething.do
>
> http://www.fred.com:8080/differentName/doSomething.do
>
> I would like to be able to change just the HTTP Request Defaults like
this;
> set up 1;
> Protocol : http
> Server : www.bob.com
> Path /application/
> Port : 80
>
> set up 2;
> Protocol : http
> Server : www.fred.com
> Path /differentName/
> Port : 8080
>
> I would like all HTTP Requests recorded through the proxy server to look
at
> the Path and only record the 'doSomething.do' when the HTTP Request
Defaults
> Match.
> I've tried a number of regular expression combinations as well with no
> effect. I even tried something like 'www.bob.com/application/' for server
> name and it didn't work either.
>
> I'm setting up the test plan now and we may have over a thousand test
cases
> and the system is deployed to 4 or more different context roots
(different
> test environments on the same box).
> thx,
> Mike
>
>
>
> Note: The information contained in this email and in any attachments is
> intended only for the person or entity to which it is addressed and may
> contain confidential and/or privileged material. Any review,
> retransmission, dissemination or other use of, or taking of any action in
> reliance upon, this information by persons or entities other than the
> intended recipient is prohibited. The recipient should check this email
and
> any attachments for the presence of viruses. Sender accepts no liability
> for any damages caused by any virus transmitted by this email. If you
have
> received this email in error, please notify us immediately by replying to
> the message and delete the email from your computer. This e-mail is and
any
> response to it will be unencrypted and, therefore, potentially unsecure.
> Thank you. NOVA Information Systems, Inc.
>
> ---------------------------------------------------------------------
> 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]
Note: The information contained in this email and in any attachments is
intended only for the person or entity to which it is addressed and may
contain confidential and/or privileged material. Any review,
retransmission, dissemination or other use of, or taking of any action in
reliance upon, this information by persons or entities other than the
intended recipient is prohibited. The recipient should check this email
and
any attachments for the presence of viruses. Sender accepts no liability
for any damages caused by any virus transmitted by this email. If you have
received this email in error, please notify us immediately by replying to
the message and delete the email from your computer. This e-mail is and
any
response to it will be unencrypted and, therefore, potentially unsecure.
Thank you. NOVA Information Systems, Inc.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
PLEASE NOTE: THE ABOVE MESSAGE WAS RECEIVED FROM THE INTERNET.
On entering the GSI, this email was scanned for viruses by the Government
Secure Intranet (GSI) virus scanning service supplied exclusively by Cable
& Wireless in partnership with MessageLabs.
GSI users see
http://www.gsi.gov.uk/main/notices/information/gsi-003-2002.pdf for further
details. In case of problems, please call your organisational IT helpdesk.
For the latest data on the economy and society
consult National Statistics at http://www.statistics.gov.uk
**********************************************************************
Please Note: Incoming and outgoing email messages
are routinely monitored for compliance with our policy
on the use of electronic communications
**********************************************************************
Legal Disclaimer : Any views expressed by
the sender of this message are not necessarily
those of the Office for National Statistics
**********************************************************************
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]