Manage credentials

Credentials are the test logins Pie uses to sign in to your app. Store one for each user role you want tested, and Pie signs in as that role during runs. Credentials are stored encrypted at rest.

Before you start

  • Create a dedicated test account for each role you want Pie to test. Never use a production account or a real person’s login.
  • You can leave two-factor authentication on. Store a fixed test code in the credential’s Password / OTP / magic link field. Codes sent by SMS don’t work.
  • Check that each account is active: not locked, not expired, not waiting on email verification.
  • If a pull request test needs roles, tenants or seeded data, set those up first with Prepare identity, access, and test data.

Open Credentials Manager

In Settings, select Credentials Manager.

Add a credential

Select Add or Add Credential. Enter a name, the test login (an email, a phone number or a username) and the password, then select Save.

Each name must be unique. It’s also how test steps refer to the credential: @{name}. Name credentials by role so the right one is obvious later, such as admin-full-access, standard-user, premium-customer or guest-readonly. You can store as many as you need.

Set the default credential

Open the three-dot menu on a credential, select Set as default and confirm. The login you gave Pie during onboarding starts as the default.

Runs without a suite, and tests without their own credential, use the default. Change it between runs, not during one, or queued work can switch accounts while a run is active. Credentials set on a suite or a test stay as they are when you change the default.

Choose the login for a suite or a test

Pie picks the login in this order: the credential set on the test, then the credential set on the suite, then the app default. Set one at whichever level you need.

  • A suite: on the suite page, open How it runs and pick a login in the Credential field. See Organize tests into suites.
  • A step or prompt: write @{credential-name} where the test should use that login. Pie fills in the stored credential. See Create and edit tests.
  • A test written in Pie Canvas: use Choose Credentials to pick a saved credential, No credential for pages that don’t need a login, or Add new.

To test the same flow as several roles, add one credential per role and create one test per role.

Edit or delete a credential

Open the three-dot menu on a credential and select Edit to change its login or password. Update the password here whenever it changes in your app, so runs don’t fail on a stale login.

You can rename any credential except the default. If you do, update the @{name} references that use it.

To remove one, select Delete. You can’t delete the default, so set another default first. If tests still use the credential, select Delete anyway to go ahead. Those tests fall back to the suite’s credential first, then to the app default.

What you’ll see

Each credential shows as a card with its name and login, and the default has a Default badge. When a test needs to sign in, Pie uses the login you assigned and the run continues past the login screen.

If Pie can’t sign in, check that the username and password are right, the account is active and the password hasn’t changed. Also check that any stored test code is still valid. Codes sent by SMS don’t work. If your app blocks Pie’s traffic with bot protection or rate limits, follow Allow Pie traffic safely. Troubleshooting lists the other sign-in failures.

Do this from your agent or API

Your agent can manage credentials with the get_credentials, create_credential and update_credential MCP tools. update_credential edits in place and keeps the ID, so tests keep working. The API equivalents are GET /v1/credentials and POST /v1/credentials, and the API never returns passwords. See MCP tools and the API overview.

To change the login for one test case, pass credentialId to update_testcase. Use "no-credential" to run without signing in, or an empty string to clear the override so the test inherits the suite or app default.

Next steps

Last updated on