Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to store postman collections in source control

I am using POSTMAN collections to test my API before opening it up. I work with a team of developers and we would like to share/add/edit our collections amongst each other.

Doing this in source control is proving slightly tricky as can be seen in this comment on the GitHUB page:

This issue still persists in Version 2.1.1 (packaged)

The order of requests might be deterministic now, but the diff of an exported collection from two different machines and users includes data that are not related to the collections exported. The diff is full of owner and other id conflicts if there are several people working on the tests at the same time.

What is the best way that we have of putting this data in some sort of version control system? Any suggestions otherwise?

like image 842
tensai Avatar asked May 25 '15 12:05

tensai


People also ask

Where can I store my Postman collection?

Win10: You have to back up your old Postman C:\Users%user%\AppData\Roaming\Postman\IndexedDB Then copy it to the same location of the new Postman installation. This will recover all your collections.

Does Postman have version control?

Postman's version control features can help you and your team to collaboratively build an API. You can fork a collection or environment, make updates to the fork, create a pull request, and merge your changes into the parent element. Version control for collections and environments is different from API versioning.


2 Answers

Putting it in a VCS undoubtly will give you some headaches as you mentioned. Your best bet is to use Postmans functionality to share collections. Here is from the documentation found at https://www.getpostman.com/docs/sharing

Starting with Postman v0.9.3 you have the ability to share and manage your collections more effectively. The first thing you will have to do is create a Postman account. You can create one using your email ID or a Google account. Once you are signed in after creating an account, the collections you upload on Postman are linked to your account. You can delete them later through the "Shared collections" item in the navigation bar dropdown.

like image 103
Magnus Karlsson Avatar answered Sep 24 '22 02:09

Magnus Karlsson


Collection v2 format removes most, if not all, problems with portability.

http://blog.getpostman.com/2015/06/05/travelogue-of-postman-collection-format-v2/

  • The format must be highly portable so that it can be easily transported between various systems without loosing functionality.
like image 43
everis Avatar answered Sep 24 '22 02:09

everis