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.
12331233

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:

📘

Enterprise feature

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

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 API test that's run in the cloud will count against your allotment. Local runs of both API and browser tests do not impact your allotment in any way.

To review total runs for browser and API tests in your workspace, go to Settings > Usage in the app.

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.


Related resources