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.
Adding 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.
Plans
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 edit plan page will open.
- Scroll to the Device settings section.
- Click on Advanced settings to open the dropdown menu.
- Toggle on "HTTP basic auth required."
Adding basic auth credentials to a plan
- 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.
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.
Applying basic auth to an ad hoc test run
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.