After seeing some of my company programmers leave a bunch of requests in a mess, it took 5 minutes to find the request I used the day before here. where I have to think again, “Not everyone notices that there is this collections API in the world” and decided to write because maybe someone doesn’t know.
First, we must understand what Collections API are.
In a nutshell, it is a Folder, which helps to pack requests into one place. Well, can’t use it? The answer is YES, but there will be some problems below.
- Will have to use History to find the used requests, similar to having to find through the History section of Chrome all day, while just 1 bookmark movement is done.
- The automatic API documents generation function provided by Postman cannot be used
- The Runner function cannot be used, which continuously runs Requests.
Create a Collections API
Step 1. Click the [create collection] button on the sidebar of Postman
Step 2. Enter the name and description (optional) of the collection.
Step 3. Save request to Collection
Create a new Request (Like the previous post)
Press the Save button
Step 4: Select the Collection to save and Save next.
Note: For TH fields that want to add requests from History to Collection.
Click the icon (+)
Select collection that you wanna save, click Save
The main settings of a Collection
- Share collections: create a link to share with others the collection (restricted by account type).
- Rename: Rename the collection.
- Edit: Edit the name and description of the collection.
- Add Folder: create a new collection inside that Collection.
- Duplicate: duplicate the existing collection.
- Export: Export the collection as a .json . file
- Monitor Collection: Used to test performance (restricted by account type).
- Mock Collection: helps to mock APIs using the Example function that postman supports. (restricted by account type).
- Publish Docs: Generates API Docs in HTML format.
- Delete: Delete Collection.
In addition to the above method, you can view Collection details by clicking the [>] arrow.
These are the main parts of Collection in Postman, each part is used in detail, I will write the following articles. Hope you continue reading to be able to master this simple but quite powerful API test tool.
To read more articles about API testing , please go this link