Variables & Secrets


Along with CSV test input, Errthquake test configurations can reference environment variables and secrets that are defined in a workspace.

Create environment variables and secrets in the Errthquake Portal on the Variables & Secrets page.

Environment Variables

Environment variables are named with values, then referenced by name in test configurations. Variables can be edited and deleted in the Errthquake portal.

Secrets

Secrets are also named with values, then referenced by name in test configurations. Secrets can be replaced and deleted in the Errthquake portal, but their values do not appear onscreen after they have been created.

Referencing Variables and Secrets

Test configurations reference variables and secrets by name with the {$ } notation.

Because they are referenced in the same manner, variables and secrets cannot use identical names.

Commands:
  adminauth:
    Url:  https://auth.myservice.com/token
    Method: POST
    Headers:
      Content-Type: "application/x-www-form-urlencoded"
    BodyText: 'username={$ADMINUSER}&password={$ADMINPASS}&grant_type=password&audience=my-app'

In this example an {$ADMINUSER} variable and an {$ADMINPASS} secret are part of the BodyText value.

Note that they are referenced with the same notation and there is no apparent difference between a variable and a secret in the test configuration.