Don't think it can be done at present using JMeter alone, but you should be
able to do half of it, and then use an editor to fix the rest.
IIRC, path prefix extraction has been wished for.
==
Record the tests for a single host, using the appropriate defaults for host
name and port. This should generate samples without the host information.
You can then replace the host name and port with variables in the defaults
page if you want.
However, the pathname prefixes will still be present in the samples.
These can be replaced with ${PATH_PREFIX} (for example) using a text editor
on the JMX file.
Then define the PATH_PREFIX variable using JMeter.
You could use the property() function instead of a variable, e.g. replace
/application/ by ${__property(path.prefix)}, which would allow you to vary
the prefix at run-time using the command-line or jmeter.properties - no need
to add a user variable page.
S.
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: 06 January 2004 15:03
To: [EMAIL PROTECTED]
Subject: How to change context root in generic manner?
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]