Basic auth

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:

  1. Go to Configuration > Credentials
  2. Click on the + New credentials button to add new credentials.
Adding new credentials

Adding new credentials

  1. Add the credential name, description (optional), username, and password.
  2. 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:

  1. Navigate to the Plan Details page of the plan you'd like to configure.
  2. Click on the pencil icon. The Plan Edit page will open.
  3. Scroll to the Device settings section.
  4. Click on Advanced settings to open the dropdown menu.
  5. Toggle on "HTTP basic auth required."
Arrow pointing to basic auth settings on the Edit Plan page

Adding basic auth credentials to a plan

  1. 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:

  1. On the Test Details page, click on the Run test button.
  2. 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.

  1. Click the Start run button to run the test.
Arrow pointing to basic auth dropdown in the ad hoc run panel

Applying basic auth to an ad hoc test run


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.