API testing is available to trial users and customers on enterprise subscription plans.
If the API URL has already been added to your mabl workspace, skip ahead to the section on creating a new API test. If not, you'll need to add a base URL for an API to an application in your mabl workspace:
- Navigate to Configuration > Applications.
- Click on the URL for a specific app/env. An edit modal will appear.
- Click Add URL.
- Choose API for the type and enter the base URL.
Omit the trailing slash
When you add a base API URL to an application/environment, leave out the trailing slash at the end of the URL. (For example, write
Omitting the slash allows for more readable requests when working in the API test editor:
- Click Save to confirm your changes. This update will create a variable called
api.urlfor that specific application/environment.
After adding a base API URL, you can create your first API test in mabl from scratch or import an existing Postman Collection.
Follow these steps to create a new API test:
- Click on the New test button in the left-hand navigation.
- Choose API test as the test type. A form to create a new API test will appear.
At a minimum, you must define the test name and the API under test.
A full list of configurations that can be applied to an API test follows:
- Test name: we recommend establishing a naming convention for tests with other members of your workspace so that you can easily locate tests and understand what they do.
- Test description: descriptions give more context or explanation for a test.
- Test labels: Useful for sorting and triggering ad hoc runs from the mabl CLI.
You may choose to add the test to an existing plan, create a new plan, or not add the test to a plan at all:
- Existing plan: Choose the plan from the dropdown. The test will use the application environment(s) that are configured for the existing plan.
- New plan: Enter the plan name and select the application and environment that the plan should run in.
- No plan: Select the application and environment for the test.
API URL required
It is not possible to add an API test to a plan or application that lacks a base API URL. To add an API URL to an application, see Configuring your environment.
Test size limits
After filling out the browser test creation form, click on Create test to open the API Test Editor and add steps!
Updated 10 months ago