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.
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 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.
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 1 day ago