Environments
testedok.yaml: local, staging and production targets with their own vars.
An environment is a named target with its own values, selected per run. One flow, many environments.
defaultEnv: local
environments:
local:
app: com.example.rote
vars:
api: http://localhost:8080
staging:
app: ./build/Rote-staging.app # a build to install, or a bundle id
platform: ios
vars:
api: https://staging.api.rote.app
secrets: [staging_password] # names only; values never go in this file
device: { udid: 1A2B-… } # optionaltestedok.yaml lives in the repository, found from the working directory upward like .git. It is versioned, and a coding agent can read it. Secret values are not in it.
Using vars
"goal": "Open {{ vars.api }}/health in the debug screen and check it says ok"Vars are filled in on your machine before anything is sent, so the API never sees a placeholder. A var the environment does not define stops the run before the app launches.
Choosing an environment
In order: --env <name>, then TESTEDOK_ENV, then testedok env use <name> (remembered in .testedok/env beside the file; add it to .gitignore), then defaultEnv. With environments defined and none chosen, the run stops rather than guess.
testedok run tests --env staging
testedok env list
testedok env use staging
testedok env init com.example.rote # writes a starting filePer environment
| Key | Meaning |
|---|---|
app | The bundle id or package name, or a path to a built .app / .apk, which is installed before the run. A path has a slash in it. |
platform | ios or android. |
vars | Plain values for {{ vars.name }}. |
secrets | Names of the secrets flows may use here. |
device | udid of the simulator or serial of the device to use. |
launch | env, args and url applied to every flow's launch; a flow's own win. See deep links. |
logins | Named ways to sign in. See secrets. |
accounts | Factories per role. See test accounts. |
Suites
Beside the environments, suites names selections of flows by tag:
suites:
smoke: { tags: [smoke] } # any flow tagged smoke
checkout: { tags: [checkout, payments] }
regression: alltestedok run --suite smoke --env staging # the flows folder is implied
testedok run tests --tag checkout # one tag, no suite neededA flow's tags live in the flow file. A run records the suite it was part of, so a suite's pass rate can be read from the run history.
In the dashboard
Each run records which environment it ran against. Environments in the sidebar shows what runs have reported for each: its vars, which secrets it names, and how the last run went. Edit the file, not the page; the page is a mirror.
In CI
Check out the repository, install the CLI, sign in with a token, and run with --env:
curl -fsSL https://testedok.dev/install | sh
testedok login --api-url https://api.testedok.dev --token "$TESTEDOK_TOKEN"
testedok run tests --env staging --junit report.xmlSecrets come from TESTEDOK_SECRET_<NAME> variables in CI.