Core concepts

Environments

Environments, to not be mistaken with Environment Variables in other platforms, enable our users to work with APIs that are available in different deployment environments. (e.g. Dev, Staging, Production)

Oftentimes Testfully users have access to or work with APIs in different deployed environments. It's an industry standard to name these deployed environments with something that reflects their nature. For example, Dev refers to an environment in which developers can test their code. Environments in Testfully are no different, a way to name your deployed API environments and use them later.

Features

Generally speaking, the Environment feature in Testfully works closely with the Config feature to allow our users to have different values for a given Config.

Example

Let's say you're working with two instances of the same API in Dev and Prod environments. Your goal is to use Testfully for sending requests to both APIs without changing the Request definition. For a scenario like the above, a combination of Config and Environment features would make a great solution.

  1. Start by adding two new Environments: Dev and Prod.
  2. Head to the Config UI and add a new config called api-base-url.
  3. Use the Environment Values section to set correct values for Dev and Prod values.
  4. Use the Default Value section to set a default value for the api-base-url config.
  5. Update your requests to use the api-base-url

Let's test the solution:

  1. Head to the API Client UI, open one of the updated requests and click on the Send button without selecting any environment. Testfully should use the Default Value to construct the endpoint URL. You can verify it by inspecting the raw request in the Request tab
  2. Select Prod environment from the dropdown, and click on the Send button again. This time, the request should be sent to the Prod API.
Previous
Requests