Environments

Environments, not to 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

FeatureDescriptionStatus
VariablesDefine variables and use them in requests
Available
AuthorizationAbility to set authorization settings for all requests
Available
SSL Ceritificate VerificationDisable or enable SSL verification for a request
Available
TimeoutSet a gloval timeout for all requests
Available

Create a New Environment

  1. Navigate to the Environments section.
  2. Click on + (New Environment).
  3. Enter a name for your new environment (e.g., Dev, Prod).
  4. Add variables as needed. Variables can be added later as well.

Add Variables to an Environment

  1. Open an existing environment.
  2. Add a new variable by entering its name and value.
  3. Click on Save to save the changes.

SSL Verification

Testfully verifies SSL certificates by default with the option to disable this feature explicitly when needed. To disable SSL verification for all requests that are sent against an environment,

  1. Open an environment
  2. Click on the Settings tab
  3. Select "Do Not Verify" as the value of the "SSL Verification" field.

Timeout

Testfully sets a default timeout of 30 seconds for all requests. You can apply a global timeout using an environment. The global timeout will be used when the environment is selected when sending requests. You can change this value by following the steps below:

  1. Open an environment
  2. Click on the Settings tab
  3. Enter a new value for the "Timeout" field.

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, the base URL for API endpoints will be different for Dev and Prod environments. Let's leverage the Environments feature of Testfully to tackle this challenge.

  1. Start by adding two new Environments: Dev and Prod.
  2. Open Dev and Prod environments, add the api_base_url variable for both environments, then click on the "Save" button.
  3. Open any of your requests and use {{api_base_url}} to load the value of Base Url. For example, I could use {{api_base_url}}/v1/users for configuring the endpoint URL for the /v1/users endpoint.

Let's test the solution:

  1. Head to the API Client UI, open one of the updated requests
  2. Select Dev environment from the dropdown, and click on the Send button again. The request should be sent to the Dev API.