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.
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.
At a high level, you will typically take the following steps when working with API tests in mabl:
- Configure your mabl environments with API URLs so that you can run API tests across environments later
- Create an API test in the API Test Editor. If you have existing Postman Collections, you can import them into mabl.
- Run your API tests and review the results
- Make updates to your API tests as needed
- Automate running your API tests by adding to a plan that runs on a schedule or gets triggered by a deployment event
API testing is available to trial users and customers on enterprise subscription plans.
To inquire about purchasing API testing, please request a quote.
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.
Yes! Like browser tests, API tests can be edited and updated by clicking on the Edit test button on the Test Details page.
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.
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.
At present, API tests in mabl do not support the following capabilities that are available for browser tests:
- Reusable flows
- API tests support mabl variable syntax, but they do not support other valid expressions: macros, faker values, and math expressions. However, you can use Postman dynamic variables in API tests thanks to the mabl integration with Postman.
Yes. Learn more about importing Postman collections into mabl here.
Yes, you can follow these steps to upload a file in an API request.
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.
Updated 8 months ago