Skip to content

UAT Test Accounts ​

Overview ​

QA test accounts are seeded into the UAT (and dev) database via scripts/seedE2eUsers.ts. Each account is pre-configured with a specific persona so that testers can exercise every role without setting up fresh users.

The seed script is idempotent — re-running it is always safe. On each run it:

  1. Creates the PostgreSQL user profile if absent, or reconciles isSuperAdmin and paymentStatus if present
  2. Creates the Better Auth credential account if absent, or updates the password hash to match the current QA_TEST_PASSWORD
  3. Assigns hospital admin roles and supervisor cross-references as needed

QA Test Account Personas ​

All accounts use Australian regulatory context (AHPRA) and have paymentStatus=completed so they bypass the payment gate and land directly on the dashboard.

EmailPasswordRoleUser TypeAccessisSurgeon
test-cpd@ppp-test.comPppTest1General PractitionerconsultantCPD onlytrue
test-cpd-nc@ppp-test.comPppTest1Registrarnon-consultantCPD onlyfalse
test-full@ppp-test.comPppTest1Consultant SurgeonconsultantCPD + PPPtrue
test-full-nc@ppp-test.comPppTest1Registrarnon-consultantCPD + PPPfalse
test-hospital@ppp-test.comPppTest1Hospital Administratorhospital_staffHospital panel (admin)false
test-hospital-exec@ppp-test.comPppTest1Hospital Executivehospital_staffHospital panel (exec)false
test-superadmin@ppp-test.comPppTest1Platform AdministratorconsultantFull access + super adminfalse

Supervisor wiring ​

scripts/seedSupervisors.ts (data in scripts/seed-data/supervisorSeedData.ts) seeds three supervisor candidates and wires each non-consultant account to two different ones (a clinician cannot be both Educational and Clinical supervisor of the same trainee), so ProfileCompletionGuard does not redirect them to /my-profile:

AccountEducational (Professional) SupervisorClinical Supervisor
test-cpd-nc@ppp-test.comHelen WarwickRaj Mehta
test-full-nc@ppp-test.comRaj MehtaAisha Okonkwo

They are not wired to test-full@ppp-test.com. Any further supervisors seen on a shared environment (for example Sarah Chen) were added by hand or by other seeds. Seeded personas may still have incomplete profile items (for example Default Working-Calendar Start) and land on My Profile; complete those by hand before a demo.

Running the Seed Script ​

UAT — via CD pipeline (automatic) ​

The CD workflow (cd.yml) runs scripts/seedE2eUsers.ts automatically on every deployment to UAT, passing E2E_TEST_PASSWORD from GitHub Actions secrets. QA accounts use the script's default password (PppTest1) unless QA_TEST_PASSWORD is also set in the environment.

UAT — manually ​

bash
cd api/backend-ppp
doppler run --project ppp --config uat -- \
  env INSTANCE_ID=pppUat tsx scripts/seedE2eUsers.ts

Note: Use tsx scripts/seedE2eUsers.ts directly rather than pnpm seed:e2e. The seed:e2e npm script runs via dotenvx ... --overload which loads .env.test and overwrites INSTANCE_ID back to pppDev.

Dev ​

bash
cd api/backend-ppp
pnpm seed:e2e
# INSTANCE_ID defaults to pppDev

Without Doppler ​

bash
cd api/backend-ppp
QA_TEST_PASSWORD=PppTest1 INSTANCE_ID=pppUat pnpm tsx scripts/seedE2eUsers.ts

E2E Automated Test Accounts ​

These are used exclusively by Playwright — not for human login.

EmailPasswordRoleAccess
e2e-ppp-consultant@ppp-test.localE2eTest123!@Consultant SurgeonCPD + PPP
e2e-ppp-nonconsultant@ppp-test.localE2eTest123!@RegistrarCPD + PPP
e2e-cpd-only@ppp-test.localE2eTest123!@GPCPD only
e2e-admin-full@ppp-test.localE2eTest123!@Head of DepartmentCPD + PPP + super admin
e2e-admin-only@ppp-test.localE2eTest123!@System AdministratorPPP only + super admin

E2E passwords are controlled by the E2E_TEST_PASSWORD env var (default E2eTest123!@).

Safety Guards ​

  • Production safety: scripts/seedE2eUsers.ts has no automatic production guard. Verify the target environment before running — ensure INSTANCE_ID targets UAT or dev, never production.
  • Idempotent: Re-running is always safe — isSuperAdmin and paymentStatus are reconciled, passwords are re-hashed to the current password env var, and nothing is duplicated.

Internal documentation — org members only