Generators or Globals

Generators or globals are just Variables at the scenario level, defined using the generate keyword. These are initialized when the scenario starts executing and are available to all endpoints in the scenario.

The only difference between generate and with variables is that generate has an additional functionality by which you can execute another endpoint and store it's result as a variable.

Limitations

If there are generators that execute another endpoint defined inside a dependency, then those generators are skipped. This is a known limitation and done in order to avoid issues with cyclic execution and some other issues.

Examples

Refer to the documentation on Variables for the syntax and more examples

"generate": {
    "variableName": "[a-z0-9 ]{100,200}",
    "longString": "{lorem_5000}",
    "name": "{datasets.name}",
    "executeDependency": {
        "api": "some_api_name",
        "scenario": "some_scenario",
        "collection": "some_collection",
        "variable": {
            "id": "response.id",
            "name": "response.name"
        }
    }
}