Skip to end of metadata
Go to start of metadata

Sometimes the same variable should be used across multiple GET or POST requests. For example, in the application where the session ID is marshaled as a query parameter, this parameter will be included in every request.

In some applications, a parameter's value submitted multiple times can have a different name in different requests.

If such a parameter has to be parameterized, searching by the parameter name will not find all instances of the parameter. In this case, instead of the Parameterization Grid, use the Parameterization Editor.

StresStimulus allows you to parameterize quickly multiple similar parameters and search by name and value using the Find and Replace feature in Parameterization Editor and Free-format Request Editor.

To parameterize multiple requests:

  1. After creating a parameter, the below dialog will appear, giving the option to bulk replace more parameters. 


2. Alternatively, select a value to parameterize and click Global Find and Replace

3. The searched value will appear in the Find What box

4. Right-click in the Replace with box and the appeared Variable Picker, select a variable. Alternatively, you can type your value, wildcard or regular expression.

5. Select Search Scope as This Request or All Requests

6. Check other applicable options

7. Click Replace or Replace All



You can also create multiple parameters from an existing parameter. Right-click on an existing parameter (a) and select Create More Like This (b). The find and replace dialog will appear with the find and replace criteria pre-filled. Click the Bulk Replace button (c) to create all possible similar parameters.



When performing an expression search across all requests initiated from either Url and Query  or Body request parts, then bulk replaces will occur in all requests' Url and body where the expression is found.

When performing an expression search across all requests initiated from the header request part, then bulk replace will occur only in all requests' headers where the expression is found.


Regular Expression and Wildcards

When the regular expression or wildcard option is selected, the entire value is replaced unless a matched group is specified, in which case only the first group is replaced. The examples below show the result of replacement with the variable: {{MyVariable}}.

Regular Expression Examples
ExpressionMatchResult
([0-9A-F]{8}\-{0,1}[0-9A-F]{4}\-{0,1}[0-9A-F]{4}\-{0,1}[0-9A-F]{4}\-{0,1}[0-9A-F]{12})b558b213-8501-894b-b0b3-39c7a4f2e840{{MyVariable}}
<id>(\d+)</id><id>123456789</id><id>{{MyVariable}}</id>


Wildcard Examples
ExpressionMatchResult
{id : "(*)"}{id : "jd123"}{id : "{{MyVariable}}"}
5_char_secret=(?????) 5_char_secret=5d3hp 5_char_secret={{MyVariable}}

Advanced Options

  • When creating header parameters using the bulk replace option, by default, parameters are not created for the Referer header. The Referer header is typically not important for load testing and parameterizing it is usually not necessary. In the event at it is required, then check the checkbox.
  • Check the Do not find/replace in previous sessions to only perform replace in the current and subsequent sessions. This option is generally used when replacing a value with an extractor, and you want to make sure that only values after the extractor are replaced.
  • After creating a parameter, often times the same parameter needs to be created in other requests.  Check the box Give the option to bulk replace after creating a parameter. Then after manually creating a parameter, the dialog "Would you like to create more parameters like the one you just created?" will appear, giving the option to create more parameters automatically.

When performing a bulk replace, parameters are never created in the Cookie header. This is because cookies are correlated automatically. If you need to parameterize a cookie, use the Set Cookie object.



  • No labels