Many secure web applications use cookie data for their session management. On the other hand, there are still a considerable number of web applications that use a URL rewriting technique for the management of their session information. Although it has some potential security risks, there are several advantages to using this technique. For an example, even if a client browser’s cookie is disabled, it still works. The other advantage is thanks to URL Rewriting, users see simpler URLs and this helps search engines and the site is indexed more accurately. Here’s how to load test these sites with HTTP URL Re-writing Modifier in JMeter.
Using HTTP URL Re-writing Modifier in JMeter
In our scenario , we will have 3 HTTP requests (In the image below Page1,2,3). The first request helps us capture the session value. Later we will use this session value with the next requests so we will be able to manage session management.
So let’s start to configure our JMeter test scenario.
First we will add a Thread Group to our Test Plan.
As a second step we will add 3 HTTP Request Sampler in to our Thread Group and name as Page1,2,3.
Now we will add the HTTP URL Re-writing Modifier by right clicking on Thread Group -> PreProcessors -> HTTP URL Re-writing Modifier.
We need to move the “HTTP URL Re-writing Modifier” to after the Page1 request.
Configuring the HTTP URL Re-writing Modifier sampler
Session Argument Name – This parameter specifies the session id parameter name of your application. This parameter name can be grabbed from the response. If your application is based on Java, this parameter name is possibly “JSESSIONID” or “jessionid”. We will use the jsessionid in our test plan.
Cache Session Id? – This is the key parameter for storing the user session and used for every request. It should be a checked state.
The other options are slightly more important and described by JMeter manual:
Path Extension – Some web apps rewrite URLs by appending a semi-colon plus the session id parameter. Check this box if that is so.
Do not use equals in path extension – Some web apps rewrite URLs without using an “=” sign between the parameter name and value (such as Intershop Enfinity).
Do not use question mark in path extension – Prevents the query string to end up in the path extension. It is made for compatibility with Intershop Enfinity.
URL Encode – The URL Encode value when writing a parameter.
After completing the test plan you are ready to run this script, as you would with any JMeter script, on AWS (Amazon Web Services) to perform load test using Redline13. Apache JMeter is one of the most popular tools for load testing and scaling out your JMeter test plan on the cloud in RedLine13 is easy. This guide and video walks you through running your first JMeter test on Redline13.
That’s it.