API testing overview

In addition to using API steps within your end-to-end browser tests, you can also use mabl to work with web requests and automate end-to-end tests for your application programming interfaces (APIs). Unlike UI tests that need to interact with a browser, API tests are performed at message layer (e.g. http protocol) and therefore run much faster than browser tests, completing in seconds, not minutes.

Use cases

You can use the API testing capabilities in mabl to achieve the following:

  • Increase API test coverage by validating that the APIs meet your expectations for functionality, reliability, performance, and security.
  • Augment your end-to-end browser tests to make them faster and more reliable.
1233

Test Output for an API test

Your workflow

At a high level, you will typically take the following steps when working with API tests in mabl:

📘

Note

API testing is available to trial users and customers on enterprise subscription plans.

To inquire about purchasing API testing, please request a quote.

FAQs

How can I define my own API test?

Before creating your first API test, you'll need to configure your environment. Then, click on New test in the left-hand navigation and select API test to get started. See our guide on creating API tests for more details.

Can I edit the API tests that I've trained?

Yes! Like browser tests, API tests can be edited and updated by clicking on the Edit test button on the Test Details page.

How does mabl execute an API test in the cloud?

Mabl executes API tests using virtualized cloud infrastructure. The same logic used to execute API tests locally in the mabl desktop application is used to execute API tests in the cloud. Responses from your servers are captured and displayed in the Test Output page.

What counts against my API test allotment?

Any request that runs as part of an API test or API step in the cloud counts towards the monthly allocated API requests for your workspace.

For example, if you run a browser test with five API steps in the cloud and then an API test with 20 API steps in the cloud, the total number of requests sent is 25. You can review more details on API testing usage in the Usage page (Settings > Usage).

Local runs of both API and browser tests, including steps run in the mabl Trainer and API Test Editor, do not impact your allotment in any way.

Do API tests support the same capabilities as browser tests?

At present, API tests in mabl do not support the following capabilities that are available for browser tests:

Can I convert a Postman collection into a mabl API test?

Yes. Learn more about importing Postman collections into mabl here.

Do API test steps support file uploads?

Yes, you can follow these steps to upload a file in an API request.

Can API tests send requests to websockets?

No, API tests do not currently support testing websockets. If you have a use case requiring testing websockets, please let us know in the mabl Product Portal.