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.

824

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.

397

Referencing variables

Variables can be referenced within a step by encapsulating the variable name with double curly brackets {{varName}}.

1424

๐Ÿšง

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.