Test accounts
Pools of accounts leased per run, and factories that make fresh ones.
Most real failures are not wrong taps but wrong starting states: the same account reused, "already exists", two runs fighting over one login. Test accounts give each run one of its own.
"goal": "Sign in with the user and password in data and open Settings",
"data": { "user": "{{ account.admin.user }}", "password": "{{ account.admin.password }}" }Pools
Add accounts to the project's pool in the dashboard (Fixtures) or from a terminal:
testedok account add admin alice@example.test # asks for the password, unechoed
testedok account add viewer bob@example.test --env staging
testedok account listBefore a run, the CLI leases a free account of each role the flow names and marks it in use; after the run it is released. The lease is one atomic database update, so two runs starting at the same moment get two different accounts. A lease lapses after 45 minutes if the CLI never came back. The dashboard shows who is free, in use or broken, and which accounts each recent run used.
{{ account.admin }} is the user; {{ account.admin.user }} the same; {{ account.admin.password }} the password, which travels as a secret and is masked like one. Any other field an account carries is {{ account.admin.field }}.
Accounts can be tied to an environment (--env staging when adding); a run against another environment does not lease them.
Factories
A factory makes a fresh account per run instead of leasing one. Under an environment in testedok.yaml:
environments:
staging:
accounts:
admin:
factory: ./scripts/make-admin.sh
cleanup: ./scripts/drop-user.shThe factory is a command that prints JSON with at least user, usually password, and anything else worth keeping:
#!/bin/sh
curl -s -X POST "$TESTEDOK_VAR_API/test/users" -d role="$TESTEDOK_ROLE"
# prints {"user":"u-8f2a@example.test","password":"…","id":"42"}It runs with TESTEDOK_ROLE, TESTEDOK_ENV, TESTEDOK_APP and one TESTEDOK_VAR_<NAME> per var. The account is recorded as in use by the run and shown in the pool while it lasts. After the run, the cleanup command runs with TESTEDOK_ACCOUNT_USER, TESTEDOK_ACCOUNT_ID, TESTEDOK_ACCOUNT_PASSWORD and one variable per extra field, and the account is deleted. Nothing from the account is ever interpolated into shell text.
From a coding agent
lease_account and release_account over MCP, with the app's bundle id to pick the project.