The RapidAPI Developer Hub

Welcome to the RapidAPI developer hub. You'll find comprehensive guides and documentation to help you start working with RapidAPI as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    Guides

Test Environments & Environment Variables

Create Test Environments

Unlike test variables, environment variables are not scoped to a specific test but are available for all the tests in an API. They allow you to create multiple environments in your test (for instance — production, dev, and staging) and assign different values for variables in different environments.

To create a new environment for your test, go to the API Settings (in the top tab menu), and create a new environment in the "Test Environments" section.

Click the "+" icon to create a new environment and give it a name.

When running your test, you can select which environment to run it in using the selector in the top right corner. Select the desired environment before running the test.

Create Environment Variables

After your environment is created you can add new variables in it just like you would with test variables.

Using the variables in your tests works just like using test variables. Either pass their name to assertion actions or use them in other actions with curly braces ({{varName}}).

Updated 8 months ago

Test Environments & Environment Variables


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.