This article describes the settings you can configure when creating a new API test: New test > API test.
For instructions on importing Postman collections into mabl, click here.
The API test creation form
At a minimum, you must define the test name and the API under test. Read on for the full list of configurations that you can apply to a new API test:
Basic information
Give your test a name. Optionally, you may add a description and labels.
As a best practice, we recommend working with your team to define naming conventions for tests so that you can easily locate tests and understand what they do. Use descriptions and labels to add clarity and structure to your workspace.
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.
Launch the API Test Editor
After filling out the test creation form, click on Create test to open the API Test Editor and add steps!
If you're new to API testing in mabl and want more guidance on adding requests and validating responses, check out the article on getting started with API tests.