We are happy to share that mabl plans now support assigning different mabl credentials or HTTP basic auth credentials to individual tests within the plan execution! With credential override, you can efficiently test multi-user workflows in a single plan execution and eliminate the need for previous workarounds, such as storing credentials in DataTables or creating separate plans for different user roles.
Try it out
To assign specific credentials to an individual test within a plan, update its test variables on the New plan or Edit plan page.
Click on the edit pencil associated with the test you want to assign credentials to. If you are on the Edit plan page, you’ll need to click on the Show tests button first to access and edit individual tests.
In the Test variables panel, click on + Add parameter. Set the Type field to “Credentials” or “Basic HTTP Auth”, according to what you need, and select the correct credentials from the dropdown. After saving your settings, the test will use those credentials during plan executions.
How it works
When a test is executed within a plan, the following rules determine which credentials are used:
- Test-specific credentials: credentials overrides assigned to a specific test take priority over any other configuration
- Plan-level credentials: if a specific test is not assigned a credential override, mabl uses the credentials defined at the plan level.
Limitation
Credential overrides at the test level are not supported for tests that are triggered using the mabl CLI command mabl tests run --from-plan-id [plan_id]. This command triggers a local, sequential execution of the tests within this plan and does not include advanced settings such as shared variables, DataTables, or credential overrides at the test level.
Learn more
To learn more, check out the following help articles: