In addition to using API steps within your end-to-end browser tests, you can also use mabl to automate end-to-end tests for your application programming interfaces (APIs). Unlike UI tests that need to interact with a browser or mobile device, API tests are performed at message layer through http protocol and therefore run much faster than UI 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.
- Combine API tests with browser and mobile tests to make them faster and more reliable.
- Create performance tests from existing API tests to validate the performance of your API under load
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:
- Configure your mabl applications and environments with the base URL of the API you want to send requests to.
- 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 tests as needed, such as creating reusable flows or snippets to streamline common API testing sequences
- Automate running your API tests by adding to a plan that runs on a schedule or gets triggered by a deployment event
Learn more
Depending on your current setup and what you want to accomplish, next steps could include learning more about the following:
- Getting started
- Advanced API testing
- Integrating with UI tests
Limitation
API tests do not support testing websockets. If you have a use case that requires testing websockets, let us know in the mabl Product Portal.