How to Use Parameters

Help Topics
Parameters are very useful if you would like to execute multiple requests to the same internet resource, but with some slight difference, for example, different value of query string parameter for each request. Parameters of various data types and generation types can be defined in project properties and then used in every project request item. Applying parameters inside request item definition will also affect execution count of the request item, for example, if you have applied parameter with five possible values, its execution count will automatically change to 5 and executing this item will produce five requests.
Important
For more information on creating parameters, see the corresponding topic.
If you would like to use parameters with particular request item, follow this procedure:
  • Open project properties from the main application menu or toolbar and switch to Parameters tab.
  • Click Add new button and then specify name for your parameter.
  • Change definition of your parameter in the right part of the window. In general, you have to specify which and how many values parameter will produce.
  • When you have completed your parameter definition, click OK button to apply project properties. Your new parameter is now created and stored inside the project.
  • Select request item in which you would like to use project parameters and open it for editing (menu option Edit Items).
  • Inside request item definition it is possible to use project parameters in the following fields:
    • URL.
    • Request body.
    • Additional request headers.
    You can use parameters in these fields in the following ways:
    • Type name of the parameter directly in the desired field and enclose its name in curly braces.
    • Press Ctrl+Space when inside the field. This will display a list of available parameters.
    • Open list of available dynamic data by clicking the corresponding button located next to the field.
    Used project parameters must always be enclosed in curly braces otherwise they won't be recognized as such and will be processed as literal text.
  • Apply changes to your request item and verify execution count value in the main application window for this item. Execution count of the item should now be changed according to the number of values that all used parameters produce.
Important
Parameters defined as Manually provided single value parameters can be temporarily changed during the execution. For a detailed tutorial on managing parameters during the execution, see the corresponding topic in How to section.

How execution count for request item is calculated

You can use any number of parameters inside request item. Execution count for request item is determined as scalar product of all used parameters. For example, if you have used three parameters in request item definition (first produces three values, second produces five values, third produces eight values), then execution count of this request item will be 120 (3 * 5 * 8 = 120). The same parameter can be used multiple times in single request item; if first parameter is used twice, then total execution count for the request item is 360 (3 * 3 * 5 * 8 = 360).
Important
If parameters are not used in request item definition, its execution count will always be 1.
Important
If particular parameter is already in use in some of the request items and this parameter is changed in such a way that changes affect number of values it will produce, execution count for all request items is automatically recalculated when parameter changes are applied in project properties window.

Renaming project parameters

Parameters can be renamed anytime in project properties. If renamed parameters are in use in some of the request items, this rename will be reflected immediately in request item definition after project changes are applied (request item properties will be updated with new names). Even if request item is currently open for editing in its own tab, UI controls where renamed parameters are used will be updated with new names immediately.

How to add project parameters after they have already been specified in request item

It is also possible to enclose some text in request item definition with curly braces even before parameter with such name exists in the project properties. If you later create parameter with such name in project properties, HttpMaster will determine if some parts of request item properties can be matched with newly created parameter and will automatically connect them if such matches are found.