Variables
Variables are key-value pairs that save data for easy reuse and referencing in multiple test steps. There are two types of variables within RapidAPI Testing:
-
Environment Variables: Environment Variables can be used across your whole API Project.
-
Test Variables: Test Variables can only be used from within the API test they are created.
Using variables in a step
Once a variable is created, you can use it in any test step. The easiest way to insert a variable is to click the variables or + var button from within a step.
This will open the Insert Variable dialog (see image below). You can toggle between viewing test variables or environment variables. Selecting insert to the right of the variable name will insert the variable reference.
Referencing variables
Variables can be referenced within a step by encapsulating the variable name with double curly brackets {{varName}}
.
Special Characters in Variable Values
If your variable value contains a special character (/ : ; $ etc...), use triple curly braces
{{{varName}}}
instead of the normal double braces.
Updated 12 months ago