Key Functionality

Environments

Managing environments

Tests need to be run against an environment i.e. a live server which can respond in the same way as the production server would

New environments can be created on Vaktum.com's environment page

A number of parameters are required to specify an environment

ParameterExplanationExample
NameThe name of the environment (free text)Petstore Staging
Base URLThe base url for all API requestsstaging.petstore.com
Auth TypeThe type of authentication to use (see below)APIKey
Custom HeadersAny custom headers to pass to the API{ 'trackingId' : 'trackme123' }

Authentication

The AuthType parameter specifies the type of authentication to use for the environment. The following authentication types are supported:

  • NoAuth: No authentication is required.
  • APIKey: Use an API key for authentication. The APIKey object must be provided with the following fields:
    • AuthHeader: The name of the header or query parameter for the API key.
    • AuthHeaderValue: The actual API key value.
  • OAuth: Use OAuth for authentication. The OAuth object must be provided with the following fields:
    • ClientID: The OAuth client ID.
    • ClientSecret: The OAuth client secret.
    • TokenURL: The URL to obtain the access token.
    • Scope: The OAuth scope.
  • BasicAuth: Use Basic Authentication. The BasicAuth object must be provided with the following fields:
    • Username: The username for Basic Auth.
    • Password: The password for Basic Auth.

Example of an environment configuration in JSON format:

Example Environment JSON

{
  "Id": "env-123",
  "Name": "Petstore Staging",
  "BaseURL": "https://staging.petstore.com",
  "AuthType": "APIKey",
  "APIKey": {
    "AuthHeader": "x-api-key",
    "AuthHeaderValue": "your-api-key"
  },
  "CustomHeaders": {
    "trackingId": "trackme123"
  }
}