Parameterizing Session Data Using Variable

 

How do I get to the Parameterization Screen?

  

Suite Manager >> Continue with Web Performance Testing >> Select load test from left-side tree view >> Click 'Edit' link under HTTP Parameters from the right panel.

 

Steps to Parameterize Session Data using Variable

 
To understand parameterizing using variables, let us consider an example. Assume you have 10 URLs in a transaction and you want to fetch the value of the session identifier from a hidden field in 5th URL and substitute the value for the session identifier in 10th URL. You can achieve this using the Store Variables and Parameterize From Variable option in the HTTP Parameters screen. The steps to achieve the same are as follows:
  1. From the left side panel of the HTTP Parameters screen, select the URL to be parameterized.

  2. Choose Store Variables tab from the HTTP Parameters screen. In this screen, in the Name column, enter the variable name as "testVar".

  3. To fill the Value column, from the Fetch Data From column, choose the list component which provides options such as Dataset, Cookie, Text, Element, Javascript, Constant, URL, Variable and Random Data.

  4. From this list, assume you want to fetch value from a hidden element, then choose the option as Element from the list component and configure the element attribute values.

  5. Click Apply. This will fill the Value column.

  6. Click Save in the HTTP Parameters screen to save the changes.

The above steps will fetch the value from the hidden field in the 5th URL and stores the value in a variable named "testVar". Now, the value stored in this variable can be used in 10th URL to substitute it in the session identifier. The steps to achieve this are as follows:
  1. From the left side panel of the HTTP Parameters screen, select the URL to be parameterized. For the example said above, select the 10th URL.

  2. Identify the session data parameter in which you want to substitute the variable value.

  3. From the Fetch Data From column, choose the list component which lists options such as Dataset, Cookie, Text, Element, Javascript, Constant, URL, Variable and Random Data.

  4. From this list component, choose the option as Variable. This will display the Response Variable screen. Enter the Variable Name as "testVar".

  5. Click Apply. This will fill the value column.

  6. Click Save in the HTTP Parameters screen to save the changes. During playback, the value stored in variable "testVar" will be fetched and substituted for the configured session identifier in the 10th URL.



Copyright © 1999, AdventNet Inc. All Rights Reserved.