You are on page 1of 2

Apache JMeter - User's Manual: Building an Advanced Web Test Plan http://jmeter.apache.org/usermanual/build-adv-web-test-plan.

html

Index Next Prev


About

Overview 6. Building an Advanced Web Test Plan


Changes
Subscribe to What's New In this section, you will learn how to create advanced Test Plans to test a
Issues Web site.
License
Contributors For an example of a basic Test Plan, see Building a Web Test Plan .

Download
6.1 Handling User Sessions With URL Rewriting
Download Releases
Developer (Nightly) Builds If your web application uses URL rewriting rather than cookies to save
session information, then you'll need to do a bit of extra work to test your
Documentation
site.
User Manual
To respond correctly to URL rewriting, JMeter needs to parse the HTML
Best Practices
received from the server and retrieve the unique session ID. Use the
Component Reference
appropriate HTTP URL Re-writing Modifier to accomplish this. Simply
Functions Reference
enter the name of your session ID parameter into the modifier, and it will
Javadocs
find it and add it to each request. If the request already has a value, it will be
Localisation (Translator's Guide)
replaced. If "Cache Session Id?" is checked, then the last found session id
Building JMeter and Add-Ons
will be saved, and will be used if the previous HTTP sample does not
JMeter Wiki
contain a session id.
FAQ (Wiki)
URL Rewriting Example
Tutorials (PDF format)
Download this example . In Figure 1 is shown a test plan using URL
Distributed Testing
rewriting. Note that the URL Re-writing modifier is added to the
Recording Tests
SimpleController, thus assuring that it will only affect requests under that
JUnit Sampler
SimpleController.
Access Log Sampler
Extending JMeter

Community

Get Involved
Mailing Lists
SVN Repositories

Foundation
Figure 1 - Test Tree
ASF
Sponsorship In Figure 2, we see the URL Re-writing modifier GUI, which just has a field
Thanks for the user to specify the name of the session ID parameter. There is also a
checkbox for indicating that the session ID should be part of the path
(separated by a ";"), rather than a request parameter

1 of 2 9/3/2013 12:40 AM
Apache JMeter - User's Manual: Building an Advanced Web Test Plan http://jmeter.apache.org/usermanual/build-adv-web-test-plan.html

Figure 2 - Request parameters

6.2 Using a Header Manager

The HTTP Header Manager lets you customize what information JMeter
sends in the HTTP request header. This header includes properties like
"User-Agent", "Pragma", "Referer", etc.

The HTTP Header Manager , like the HTTP Cookie Manager , should
probably be added at the Thread Group level, unless for some reason you
wish to specify different headers for the different HTTP Request objects in
your test.

Index Next Prev

Copyright © 1999-2013, Apache Software Foundation


Apache, Apache JMeter, JMeter, the Apache feather, and the Apache JMeter logo are trademarks of the Apache Software Foundation.

2 of 2 9/3/2013 12:40 AM

You might also like