Skip to content

Variables & Secrets

How to use variables and keep secrets safe in ZeniTest.

Define reusable variables at the top of your test file:

variables:
query: Mechanical Keyboard
steps:
- act: Type '${query}' into search bar

To keep passwords and API keys out of git repositories, use ${secret.KEY} in your test steps:

steps:
- act: Type '${secret.SAUCE_PASSWORD}' into 'Password'

Create a secrets.yaml file in your test folder or project root:

secrets:
SAUCE_PASSWORD: secret_sauce

ZeniTest also checks environment variables automatically (e.g. SECRET_SAUCE_PASSWORD).