Mabl credentials

Using mabl credentials in your browser tests

Mabl credentials are a special type of variable in mabl. The values of mabl credentials are encrypted with a customer-specific encryption key before getting added to our database.

This guide outlines how to create mabl credentials and use them in browser tests.

Creating mabl credentials

You can add mabl credentials by clicking on Configuration in the left-hand navigation and selecting the Credentials tab. Only owners and editors of a workspace can create mabl credentials.

1185

Adding credentials to a workspace

You can create the following types of credentials:

  • Basic
  • Basic with MFA
  • Cloud
  • Cloud with MFA

Basic

Basic credentials consist of a username and password. You can use them for training and running tests locally and in the cloud.

Basic with MFA

Basic credentials with MFA consist of a username, password, and MFA authenticator secret code. You can use them for training and running tests locally and in the cloud.

You may update and clear the secret code for basic with MFA credentials, but you cannot retrieve an existing secret code.

Cloud

Cloud credentials consist of a username and password. You may only use cloud credentials for cloud runs.

The username and password may be updated, but you can never retrieve the password once the credentials are saved.

Cloud with MFA

Cloud credentials with MFA consist of a username, password, and MFA authenticator secret code. You may only use cloud credentials with MFA for cloud runs.

You may update the username, password, and secret code, but you cannot retrieve an existing password or secret code once they are saved.

👍

We recommend using cloud credentials and cloud credentials with MFA for sensitive data.

Training with mabl credentials

You can train tests with basic credentials or basic credentials with MFA. You cannot use cloud credentials to train tests.

Mabl credentials appear in the Trainer as app.defaults.username and app.defaults.password.

344

Training with mabl credentials

New browser tests

If the new browser test is part of a new plan or no plan, select credentials in the Show advanced options section.

Assigning credentials for a new test

Assigning credentials for a new test

If a new browser test is part of an existing plan, make sure credentials are assigned to the plan.

Existing tests

When training an existing browser test, you can configure the training session to use a specific set of credentials in the Edit test configuration modal.

Assigning mabl credentials to plans

Credentials set at the plan level override credentials set at the test level. To assign credentials to a plan:

  • Toggle on "Login credentials required."
  • Select the credentials from the dropdown.

You may only assign one set of mabl credentials to a plan. All tests that use mabl credentials in a plan run - app.defaults.username and app.defaults.password - use the same set of credentials.

📘

Note

If a test is associated with a plan that uses cloud credentials, the cloud credentials password is not available in the mabl Trainer. In this situation, you can try:

  • Changing the mabl credentials for the current session: {x} > Manage variables > Session Configuration
  • Turning off the record button and manually logging in to the application with an appropriate set of credentials

Running tests with mabl credentials

Plan runs

If the test is run as part of a plan, the test uses the credentials assigned to the plan. If a different set of credentials is assigned to the test, they are overridden by the credential values set at the plan level.

Mabl credentials are not environment-specific. If an app login requires different credentials in different environments, you can use environment variables to log in to your app.

Ad hoc runs

When a test is run ad hoc, you can select a set of credentials in the Ad hoc cloud run panel before triggering the test run. Cloud credentials are not available for local ad hoc runs.

📘

Unified Runner support

Cloud credentials are only supported on the Unified Runner.

If you run a test with cloud credentials on the Legacy Runner, mabl stops the test during the mabl test run setup step. Re-run the test on the Unified Runner or use a different set of credentials.

Reviewing test runs with mabl credentials

To identify which set of credentials were used in a test run, you can click on the setup step - mabl test run setup click to view logs. If credentials were passed to the test, they appear in the logs of this step.

In the following screenshot, the Test Output page shows that the "admin" credentials were used in this test run.

1407

Checking credentials on the Test Output page