Using basic auth credentials in browser tests
If your test environment is protected by HTTP basic auth, you can configure cloud runs to use basic auth credentials. This guide outlines how to add basic auth credentials to mabl and apply them to your browser tests.
Adding basic auth credentials to mabl
To use basic auth credentials in a test run, create a set of mabl credentials:
- Go to
Configuration > Credentials
- Click on the + New credentials button to add new credentials.
- Add the credential name, description (optional), username, and password.
- Click the Save button.
Applying basic auth credentials to tests
After adding basic auth credentials as mabl credentials, you can associate them with plans and ad hoc test runs.
You can configure a plan to enable the HTTP basic auth by taking the following steps:
- Navigate to the Plan Details page of the plan you'd like to configure.
- Click on the pencil icon. The Plan Edit page will open.
- Scroll to the Device settings section.
- Click on Advanced settings to open the dropdown menu.
- Toggle on "HTTP basic auth required."
- Click the Save plan button at the bottom of the page.
Ad hoc test runs
Basic auth is also supported for ad hoc test runs both locally and in the cloud. Follow these steps to configure basic auth for ad hoc runs:
- On the Test Details page, click on the Run test button.
- In the Ad hoc run panel, select the appropriate credentials from the "HTTP basic auth credentials" dropdown.
Using basic auth and application logins
It is possible to use both HTTP basic auth and login credentials at the same time. If basic auth credentials are specified, mabl sends those credentials at the HTTP layer with all requests to your test site. If login credentials are also specified, mabl uses those credentials to log in to your application.
- Click the Start run button to run the test.
Basic auth in the mabl Trainer
Basic auth settings do not apply in the mabl Trainer. When you play back steps in the mabl Trainer, you must enter basic auth credentials manually.
Updated 21 days ago