The API Test Editor

Creating steps and managing settings in the API Test Editor

In the API Test Editor, you can create steps, manage variables, configure flow-level settings, and run test steps for quick feedback.

10791079

The API Test Editor

📘

Importing tests from Postman

If you already have an existing Postman Collection that you would like to import into mabl, see our documentation on importing from Postman.

Adding steps

To create a request step in the API Test Editor, take the following actions:

  • Click on the plus sign button in the left panel. A panel will appear on the right side to configure the step.
  • Give your request a name in the Request Details section (optional).
  • Select the request method: GET, POST, PUT, PATCH, FETCH, DELETE, HEAD, or OPTIONS.
  • Enter the API endpoint.

📘

Use mabl variable syntax

When you enter the API endpoint, you can use mabl variable syntax to reference the base API URL (api.url). For example, if the base URL is https://example.com/api, and you want to make a GET request to https://example.com/api/users, you can write {{@api.url}}/users as the endpoint.

38283828

Creating an API test step

The response will appear in the Response section. You can add assertions, variables, and test scripts for this response in the Validation and variable assignment section.

Managing variables

There are two places where variables are managed within an API test:

The variables section

All variables in an API test appear on the left side in the Variables panel. In this section, you can:

Validation and variable assignment

Use the Validation and variable assignment panel on the right side to create variables from the response of an API request.

See our documentation on using variables in API tests for more information.

Flow-level settings

In addition to configuring individual request steps, you can use flow-level settings to apply authentication or scripts to every step in the test.

Click on the pencil icon in the flow title card to bring up the flow properties modal.

24002400

Editing flow-level settings

Authentication

Supported types include API key, basic auth, bearer token, and OAuth 1.0. If you need support for additional authentication types, please let us know via the mabl Product portal.

More details on authorizing requests can be found here.

Scripts

Flow-level scripts include the option for both pre- and post-request scripts. Click here for more information on flow-level scripts.

Running steps

You can run the entire test or run individual steps in the API Test Editor.

  • To run the entire test, click on the play button in the top left corner.
  • To run individual steps, click on the Send button in the Request details panel.

For more information on running API tests locally and in the cloud, click here.