Handling Session Identifiers

Session identifiers are used by the application to uniquely identify a client browser, while background (server-side) processes are used to associate the session identifier with a level of access. Thus, once a client has successfully been authenticated to the web application, the session identifiers can be used as a stored authentication voucher so that the client does not have to retype their login information with each page request. Cookies provide a fairly simple approach to tracking sessions, but because cookies do not work in all situations, URL rewriting provides an alternative (some browsers do not support cookies, others allow the user to disable cookie support).

Because a different session ID value will be associated to a user each time he connects to the application, a AgileLoad script containing session ID cannot be replayed as such. The static values of the different session IDs written in the script during the recording must be replaced by variables. The new session ID values must be dynamically assigned to those variables.

If the FMStocks demo site has been downloaded, it can be configured to manage session identifiers with the URL rewriting method (see FMStocks web site installation manual).

In the FMStocks script, all the HTTP requests which are located after the logon HTTP request, contain a folder that is a complex character string (red rectangle on figure below). This complex character string is a session identifier.

AgileLoad offers two ways to resolve this session identifier problem:
 

Using a Model

Models are used to automatically manage all the session identifier of your script.

By default, AgileLoad offers models for several application types:

  1. Select the "Folder SID" model in the model drop-down list located in the Tools toolbar.


     
  2. Click the icon to apply the model to the FMStocks script. All the session identifier values have been replaced by the "FolderSID_1_QT" variable and a parsing function has been added to the POST HTTP request in order to load the session ID value in the "FolderSID_1_QT" variable.


     
  3. The script is now valid and can be replayed.

Remark: For more information see "Automatically_resolve session identifiers using a model".

Select and Replace

  1. Select an HTTP request which contains a session ID in the script and click the "Manage Session ID" toolbar icon.



    The following dialog box is opened.


     
  2. Select the complex character string from the "Folder" drop-down list (i.e.: select "CJIdz6549-9F47279126D39EAC7F46E802CBFA69D1")
    The selected session identifier is highlighted in the script.
     
  3. Click "Replace All"; All the session identifier values have been replaced by the "URL_1_QT" variable and a parsing function has been added to the Submit request in order to load the session ID value in the "URL_1_QT" variable.
     
  4. The script is now valid and can be replayed
     


 





Go back to the Learning center:


Copyright © AgileLoad. All rights reserved.
Agile Load testing tool| Contact AgileLoad | Terms of Use | Sitemap