mabl credentials are a special type of variable used for training login and authentication scenarios. This article explains how to work with credentials in mabl, including how to…
- Create credentials
- Train tests with credentials
- Assign credentials to a plan
- Assign credentials to an ad hoc run
- Review credentials in test runs
If you're looking for information about training logins for your app, check out the article on logging into your app.
How to create mabl credentials
Workspace owners and editors can create a new set of mabl credentials by taking the following steps:
- Go to the credentials page: Configuration > Credentials
- Click on the + New credentials button.
- Enter the name of the credentials, the username, and the password. Optionally, you may configure additional settings:
- Add the credentials to a resource group to control who can access them.
- Save the credentials as cloud credentials.
- Add an MFA authenticator to use the credentials for multifactor auth workflows.
- Click Save.
How to train with credentials
Before creating or editing a test, select the credentials you want to train with in the Optional configurations section.
Assigning credentials for a new test
Cloud credentials are not available for training
You cannot use cloud credentials to train tests.
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
mabl credentials appear in the Trainer as app.defaults.username
and app.defaults.password
. In the API Test Editor, you can access mabl credentials as api.credentials.username
and api.credentials.password
.
How to assign 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 use the same set of credentials.
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.
How to assign credentials to an ad hoc run
To assign credentials to an ad hoc test run, take the following steps:
- Navigate to the test details page of the test that you want to run.
- Click on the Run test button.
- Select the credentials you want to use. Cloud credentials are not available for local ad hoc runs.
- Click on the Start run button.
Reviewing test runs with mabl credentials
For security, mabl replaces the value of app.defaults.password
and api.credentials.password
with asterisks in local and cloud run output.
To identify which set of credentials were used in a browser or mobile 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.
Checking credentials on the test output page