Describe your users and seed data once. Every copy of your app comes up with both, so a test can sign in and start straight away.





List a user for each role your tests need, like owner, member and viewer, in cofactor.sandbox.yaml. Seeds are scripts that create the workspace, members and records your tests start from.
personas: owner: { email: owner@example.test } member: { email: member@example.test } viewer: { email: viewer@example.test }actions: create-workspace: description: A new workspace, created by the given persona. run: sandbox/actions/create-workspace.sh input: name: { type: string, required: true } as: { type: persona, required: true }environments: default: seeds: - { id: acme, action: create-workspace, input: { name: Acme, as: owner } } - { id: add_viewer, action: add-member, input: { workspace_id: "${acme.workspace_id}", persona: viewer, role: viewer, as: owner } }
Cofactor generates one for each user when it builds the copy. They aren’t stored in your repository.
Yes. Declare one user per role and sign in as each.
No. Seeds create what the tests need. You can restore a database dump if you want to.
Google and OpenID Connect sign-in are stood in for inside the copy, so tests never need a real account.