Test accounts for each role, kept safe
Test accounts for QA: one per kind of user, made for testing, never a real person’s, with the least rights that do the job.
Good test accounts for QA follow four rules. One account per kind of user. Made for testing, never borrowed from a real person. The least rights that kind of user has, and no more. And the login kept somewhere a leak can’t reach: a password manager or your pipeline’s masked variables, never the repository or a chat.
The setup to replace is one test account, an admin, with its password in a wiki page. Here is what to have instead.

One test user per kind of user
List the kinds of people who use your app: a visitor, a free user, a paying one, an editor, a viewer, an admin. Each needs an account of its own, because each of them sees a different app.
Then add one more: a second account of the kind that owns things. Two editors, or two customers. It is the only way to test that one person can’t open what belongs to another by typing its address. We wrote that test up as the IDOR check, and it needs exactly this account.
Some states need an account kept in them. If your plans have limits, keep one account at its limit, and one on the paid plan, so “what does a full account see” and “what does a paying user get” can be checked without setting it up each time.
What you don’t need is five accounts per kind. One each. More accounts means more passwords to keep and more data to explain.
Made for testing, never a real person’s
Do not test with your own account, a colleague’s, or a customer’s who said it was fine.
- Your own account is the wrong kind. It is an admin with a year of data. It proves the app works for the person least like your users.
- A real person’s account has real data. A test that creates, edits and deletes will do that to something that mattered.
- A real person changes. They leave, change their password, turn on a second factor, get promoted to admin. Your tests break, or worse, start passing with rights they shouldn’t have.
Name test accounts so anyone can recognise them in a user list: qa-viewer, qa-editor, qa-editor-2. Give them an address on a mailbox you control, so reset and confirmation emails arrive somewhere.
The least rights that do the job
A test account is a way into your app that isn’t tied to a person. Treat it that way.
- Give the viewer account a viewer’s rights. Don’t “make it admin for now”.
- Keep admin test accounts on staging where you can. An admin on production can change what real customers see, and a test that goes wrong with that account goes wrong for everyone.
- Tell your tests what they must never press. A test account can still reach “Delete account”, “Pay” and “Send to all”.

Where test accounts for QA keep their logins
Keep each login in a password manager shared with the people who need it, or in your pipeline’s masked variables for tests in CI, never in the repository, a wiki, a chat or a log. Better still, some apps can hand a test user a one-time sign-in link, so no password exists. Where the secret lives in CI, and the places it leaks, are in test credentials in CI.
Test accounts in production
Testing on the live app is worth it. It is the only place where your real configuration, real data sizes and real third parties are. The accounts just need a few extra rules:
- Mark them. A flag or a naming rule, so they can be left out of revenue numbers, user counts and marketing emails.
- Keep their data small and known. Three items with names you chose beat three hundred left by old runs.
- Clean up after each run. Delete what the test made, and only that. See test data cleanup.
- Protect them from your own clean-up scripts. The job that removes inactive accounts will find them one day.
- Never use a production test account’s password anywhere else.
A second factor on a test account is a real trade. Switching it off makes the account weaker. Leaving it on means the test needs the code. If your app can issue a one-time sign-in link for a named test user, that settles it without a password or a code.
How EveryRole handles test logins
EveryRole starts without any. It explores your app signed out, as a visitor, from the address alone. Signed-in kinds of user come after, when you add them, each with a test account you made for it.

A kind of user can be marked as an admin, and by default an admin kind is explored and tested only on staging or previews, never on your live app.
There are three ways to sign it in, from least to most shared. Your app can hand it a one-time sign-in link for the test user on each run. Or the tests run in your own CI, where the logins live in your pipeline’s masked variables. Or you give it the test account’s password, which it keeps encrypted. In every case the password is never sent to an AI model.
It cleans up what a run made, and only that, and says so when it couldn’t. The accounts themselves are yours to make. It can’t know which kinds of user your app has until you tell it.


