Context parameters can be used within a monitoring device to send contextual information with each request or dynamically change the request parameters.

Use the following syntax to specify Context Parameters:

context.<variable name>

Context parameters’ names must be identical to the names of the respective web elements you want to specify. Note, that the parameter name is case sensitive.

To specify a parameter name in the request, Inspect the respective element code, and copy the “name” attribute value.

Let’s say, we want to monitor submitting a website registration form with unique field values. First, we need to create an HTTP task with the corresponding Post request. Then we need to add parameters for the form fields in the request body (Post Data) and convert their value to context variables.

To add a new parameter:

  1. Select Post in the Request Type field.
  2. Expand the Post Data field and click the Detailed toggle, then click Add Parameter.
  3. In the Parameter name field, type in the form’s field name how it appears in the respective element code.
  4. To convert the parameter value to context one, point to the Value field and click the gear icon.
  5. In the Edit Value window, select Dynamic and specify the parameter value using the following syntax: context.<variable name>. Click Done.
  6. To specify a default dynamic value for a context parameter, click the actions menu button   on the Task Configuration sidebar and click Manage Context Parameters.
  7. Make changes and click Done to finish.

In the picture below Name and Pwd request parameters are now going to take the value out of the context parameters named “login” and “password” respectively.

Manage Context Parameters

If an HTTP(S) device has Context Parameters you can find the list at the device edit screen on the Task tab. To open the Context Parameters manager, on the Tasks Configuration sidebar, click the bar action menu  , and then select Manage Context Parameters.

To delete a context parameter, convert it to Static as described above, and then select it in the Context Parameters manager and click the bucket icon.

A context parameter can’t be deleted from the list if it is used in more than one task within the device. To delete the parameter from the system, delete or convert it to Static in other tasks.