This article explains how to create a new API test.
For instructions on importing Postman collections into mabl, click here.
To get started, click on the New test button in the left-hand navigation and choose API test as the test type. At a minimum, you must define the test name and the API under test.
A full list of configurations for API tests follows:
Creating a new API test
Basic information
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
Test descriptions give more context or an explanation of the goal of the test.
Test labels
Test labels are useful for sorting and triggering ad hoc runs from the mabl CLI.
Core settings
Defining the base API URL is required. There are three ways to do this:
- Add to plan: When you add the test to an existing plan, the test uses the application, environment, and base API URL associated with the plan.
- Associate with an application: When you associate the test with an application, the test uses the application's base API URL. For applications with multiple environments or base API URLs, you must further specify which environment or base API URL you want to use for training.
- Start with a new API URL: To test a base API URL that isn't associated with any application or plan in your workspace, check the box "Enter a starting API URL to use to train your test" and enter the base API URL.
Optional configurations
Expand Optional configurations to associate the test with mabl credentials or a DataTable.
Authentication
Select a set of mabl credentials to use while creating your test. The credentials dropdown does not appear for tests that are added to an existing plan. Instead, the test uses credentials associated at the plan level.
DataTables
Select a DataTable scenario to load into the API Test Editor.
Please note that API tests cannot exceed 1MB in size. We recommend using caution with large JavaScript scripts.
After filling out the test creation form, click on Create test to open the API Test Editor and add steps!