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 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 to quickly parameterize 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. Select a value to parameterize

    2. Click Global Find and Replace

    3. Searched value will appear in the Find What box

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

    5. Select Search Scope as This Request or All Requests

    6. Check other applicable options

    7. Click Bulk Replace

     

     

     

     

     

     

    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.

    Icon

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

    When performing an expression search across all requests initiated from 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 match group is specified, in which case only the first group is replaced. The examples below show the result of replacement with 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.

     

    Icon

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

     

     

    • No labels