Handling URL Parameters (GET or POST Data)

Overview

 

After recording a business case, if your test procedure requires dynamic substitution of URL parameters (POST or GET data) from cookies, response body, or from an external source such as database or CSV, Web Performance Test Studio provides the View or Parameterize URL option.

 

The advantages of using parameterization in the script is as follows:

Handling URL Parameters

 

Identify the category under which each of  the URL parameters fall such as

Constant

 

Constant type parameters do not change values between a recorded session and a replay session. The values recorded can be used as it is for replay.

 

Dynamic

 

Dynamic parameters requires that their values be obtained from the response of the previous request. The parameter value can be extracted from one of the following: 

 

Parameter Value Extracted From

Description

Cookie     

Fetch parameter value from the Cookie Set in the response header.

Element   

Fetch parameter value from an element attribute value of a hidden form
element.
For example <input  type="hidden"  name="jsessionid" value="QE1469"> use the element attribute value for parameter.

Text (Response Body) 

Fetch parameter value from the body of the response. 

  • Between configured prefix and suffix text.
  • Extract text using Regular expressions. For example to extract sessionid from the below html you use 

Regular Expression: [\s\S\n\r]*?sessionid=
Suffix:
>

 

<HTML> 

<TR><TD>Server Configuration </TD>

<TD><A HREF=serverconfig.html?sessionid = 810> Config  </A>

 </HTML>

Javascript

Fetch cookie or parameter value from the specified Javascript.

URL

Fetch cookie or parameter value from the previous URL for the given prefix and suffix text.

 

 

Dataset                       

 

Parameters that need unique data for each use (such as user login and passwords) and that are fetched from any external datasource such as Database or FLAT file fall in this category.

 

For example, when testing a Web application that contains a login page, "parameterization” lets you use a different login name and password for each virtual user (dynamic substitution of values). There’s no need for each User Scenario to contain a separate script that performs the task of logging in.  

 

Configuring URL Parameters

 

Data parameterization for URL parameters is configured using the Configure Parameterization UI invoked using the Record->View or Parameterize URL menu item. To know the detailed steps of configuring the same, please refer to the context sensitive help in the following link.



Copyright © 1999, AdventNet Inc. All Rights Reserved.