Test Credentials

View as Markdown

Save login credentials in your project so the AI agent can authenticate automatically during test runs. No passwords in test prompts.

Adding credentials

  1. Go to Project → Test Accounts
  2. Click Add Credential
  3. Choose an auth method and fill in the required fields:
    • Label - identifies the credential (e.g., “admin”, “viewer”)
    • Username - email or username
    • Password - stored encrypted
    • Login instructions - required only for custom auth
  4. Click Save

You can add multiple credentials per project for different roles (admin, regular user, read-only viewer, etc.). You can also add credentials for Google and GitHub OAuth flows.

If a saved credential is missing or rejected during a run, see Auth Troubleshooting.

Environment overrides

If the same account role uses different login details on staging, preview, or another saved environment, edit the credential and add an environment override. The test still references the same credential, such as “admin”, but TesterArmy automatically uses the environment-specific username, password, or custom instructions for runs targeting that environment.

Production uses the default credential and does not support environment overrides.

Leave override fields blank to inherit the default credential. Clear an override to return that environment to the default values.

Webhook and API-triggered runs must pass projectEnvironmentId for these overrides to apply. Copy the environment ID from Project Settings → Test environments, or read it from GET /api/v1/projects/{projectId}. Passing only environment: "staging" changes the Results label, but it does not select saved environment credentials.

Custom auth

Use Custom when your app has an auth flow TesterArmy does not handle directly, such as:

  • A staging bypass link or test-only route
  • Unsupported SSO
  • An extra access-code step before the normal login form
  • A multi-step flow that needs app-specific instructions

Write clear login instructions for the agent, for example: “Open /staging-login, click the test-only bypass link, enter the access code shown on the page, then continue to the dashboard.”

Custom instructions are encrypted at rest, but they are sent to the AI agent during a run and may appear in run traces and logs. Use the username/password auth method when you need to store reusable login secrets, and never put production credentials in custom instructions.