The mabl integration with Postman supports importing Postman collections into mabl as API tests. This article explains how to import a Postman collection:
Export from Postman
In Postman, export the Postman collection as a JSON file in collection format 2.1:
- Open a Collection that you'd like to import to mabl.
- Click on the More actions (...) menu.
- Select Export. Postman asks you which collection format you want to save the exported file in. Please select version 2.1.
Exporting a Postman collection
In mabl, click on the Import API tests button on the tests page:
Where to find the Import API tests button
The Postman collection importer
Upload the JSON file that you exported from Postman.
While mabl also supports importing Postman collections from the API Test Editor, we recommend using importing Postman collections from the tests page due to the support for folders and greater customizability.
Selecting the requests to import
Select the folders and requests you wish to import into mabl. If the collection contains folders, you can choose whether to import the collection as a single test or as separate tests:
- Single test - the collection becomes one API test in mabl. The order of requests will be the same as the default order when running the collection in Postman. Requests in folders are first, followed by any requests in the root of the collection.
- Separate tests - each folder that contains a script becomes a separate API test in mabl. When treating each folder as a separate test, the requests follow the order of the folder.
Check the pre-request and test scripts to import into mabl, including at the collection, folder, and request-level.
For more information about how scripts are applied when importing a collection, check out this article.
Choose settings for the created tests
Associate the imported tests with a plan or application. Optionally, you may also associate the tests with a branch or test labels.
Preview the imported tests
View and edit
On this page, you can review your chosen settings and the tests that will be created.
On the right, you will be able to view your branch, plan and label settings, as well as view and edit any collection-level scripts being imported.
On the left, you will be able to expand any individual test to see the requests that will be imported, along with their associated scripts and authentication settings. Additionally, if importing folders as separate tests, you will be able to click the "View folder scripts" button to view any folder-level scripts that will be recreated on the new mabl API test.
Reviewing created tests
Review your created tests. If there are any errors while creating the tests, they are described on this page.
To ensure that settings in your Postman test work as expected, check out the following articles: