Book Image

Performance Testing with JMeter

By : Bayo Erinle
Book Image

Performance Testing with JMeter

By: Bayo Erinle

Overview of this book

Table of Contents (14 chapters)

Managing sessions with cookies


A majority of web applications rely on cookies to maintain the session state. In the very early stages of the Internet, cookies were only used to keep the session ID. Things have evolved since then and cookies now store a lot more information, such as user IDs and location preferences. The banking application we used as a case study in Chapter 2, Recording Your First Test, for example, relies on cookies to help each user maintain a valid session with the server, enabling the user to make a series of requests to the server. An example will help clear things up, so let's get right to one. For our example, some resources are protected based on the role of the user that is logged in. Users can have an admin or user role. The steps to manage sessions with cookies are as follows:

  1. Launch JMeter.

  2. Start the Test Script Recorder (refer to Chapter 2, Recording Your First Test, if you don't know how).

  3. In the browser, go to http://jmeterbook.aws.af.cm/.

  4. Click on the User Protected...