For teams who make test accounts by hand before testing, and want a script for it.
Your setup
- A web app with plans (free, pro, team) and roles (owner, member).
- An admin token that can create and delete accounts on staging.
- A GitHub repo for the scripts.
Say this to Certyn
We need a script that creates test accounts on staging for each plan and role through our API, and one that deletes them. Put them in acme/web under scripts/test-accounts and open a PR.
What Certyn does
- Opens secret forms (
env_var) for the admin token (ADMIN_API_TOKEN), one password for all test accounts (TEST_ACCOUNT_PASSWORD), andGH_TOKENif needed (Contents and Pull requests Read and write). - Saves the repo as
GITHUB_REPOso later runs find the scripts (you approve). - Clones the repo on its Machine and finds the account and plan endpoints in the code or API spec.
- Writes two scripts in your repo's language (Node or Python) on a
certyn/<name>branch:createmakes one account per plan and role, with realistic names and fixed emails such asqa+pro-owner@acme.test.cleanupdeletes only accounts that match that pattern.--dry-runshows what it would delete.
- The scripts read
TARGET_BASE_URL, the token and the password from environment variables, never from code. - Runs create once on the environment you named, signs in as one new account to check it, and runs cleanup.
- Opens a pull request with the scripts, a short README and the test output.
- Adds a wiki testing rule, for example Before tests that need a plan or role, run scripts/test-accounts/create.mjs from GITHUB_REPO; run cleanup at the end. Every run reads it.
What you get
- Two scripts your team owns and can run in its own CI.
- Runs that create the accounts they need, then remove them.
Limits
- Use a test environment. Certyn asks before it writes to production.
- Cleanup can delete only what your API allows. Without a delete endpoint, Certyn says so and the accounts stay.
- If new accounts must confirm an email, the API needs a way to skip it, for example an admin call that marks the email confirmed.
- Two runs at the same time share the fixed emails. Ask for a run id in the email if that matters.
- Certyn never merges.