postmanlabs / postman-app-support

Postman is an API platform for building and using APIs. Postman simplifies each step of the API lifecycle and streamlines collaboration so you can create better APIs—faster.
https://www.postman.com
5.85k stars 839 forks source link

Sync Environments/Collections With Azure DevOps Repo #11915

Open steve-dev-auto opened 1 year ago

steve-dev-auto commented 1 year ago

Is there an existing request for this feature?

Is your feature request related to a problem?

Currently, there is support for connecting a custom API with Azure Devops to allow syncing of it back and forth. But our team, and lots others, do not use Postman for writing APIs.

Even with the paid version (which we have), we still cannot sync collections/environments with Azure DevOps repos, similarly to how you can with GitHub.

Describe the solution you'd like

There should be a clear and concise way to sync our workspaces with Azure DevOps repos to sync environments/collections back and forth without the need for having a custom API created. As above, we have purchased the paid versions so having this as a paid feature is still fine.

Describe alternatives you've considered

The only way around this is to manually export each collection and push them to the DevOps repo ourselves which is very annoying once you hit large numbers of users and large numbers of collections. This should be seamless like you currently already do for GitHub

Additional context

I have seen similar requests on here but none around just syncing tests to DevOps repo. This allows our tests to be held within the same location as our other code for pipeline integration without the ugly manual steps

shashankawasthi88 commented 1 year ago

@steve-dev-auto can you dive deeper into your workflow once? How do you folks build/ evolve your collections? What do you do with the collections and environments once they are synced to the repository?

steve-dev-auto commented 1 year ago

@shashankawasthi88 Yeah so the workflow we are using is as follows:

We define our APIs elsewhere (not within Postman), and once created, we then write and develop test cases in Postman grouped in to Environments and Collections. Then, we want to upload and sync these collections up to DevOps Repo to store our test code in our project codebase. Then once the code is in our DevOps Repo, we will run these on the DevOps CI/CD pipeline on deployment.

But, currently in Postman we cannot sync these up to DevOps repo. There is similar functionality to link collections to GitHub, GitLab etc, and if you create APIs in Postman you can sync those and their test collections to DevOps, but for just Collections alone (without a Postman created API), there is no way to syncing collections to DevOps. This means that we have to export and then manually upload every request we have every time we make a change. Which is very time consuming and very bulky, when the rest of the Postman process makes it much more streamlined

shashankawasthi88 commented 1 year ago

@steve-dev-auto thanks for the response. For such usecase, we do recommend the path of going via the API object within Postman. It allows you to manage your API producer lifecycle with enhanced version control using git. What issues do you see in creating an API object and moving your collections to it?

steve-dev-auto commented 1 year ago

@shashankawasthi88 thanks for the reply. So for this recommended path, how would that work? We would like to avoid having to import the entire API code into Postman for several reasons, one being the fact we have hundreds of APIs that we need tested, and another being that our API code resides within a different location where, policy-wise, we cant import its code elsewhere into a different application such as Postman.

Is it possible within your API Builder to not import the API definition of our APIs, but instead have it as a high level way or organising our tests? I.e. have an API called "api 1" but have no underlying definition, and then add our tests that way? The step we need to avoid is importing our API code into Postman as we treat Postman currently as a place for our tests alone, which calls to our APIs on our end

steve-dev-auto commented 1 year ago

@shashankawasthi88 any update to the above comment? I am just curious to figure out a workaround as soon as possible

shashankawasthi88 commented 1 year ago

@steve-dev-auto the workflow that you suggested is not what we are building for as of now. We don't have any workaround as of now for the workflow that you suggested.

steve-dev-auto commented 1 year ago

@shashankawasthi88 thanks for replying. Are there any plans to implement the same sync support for collections/environments to Azure DevOps repo that you currently have within the API Builder? As we build out our framework, the manual process we have to do to get our tests up to DevOps repo currently will become a real issue.

About your reply above, when using API Builder, you must import the API definition before tests can be added? Just so I am clear that there is no way of getting around having to have the API definition added to the API Object

oisinmcl-post commented 1 year ago

@steve-dev-auto @shashankawasthi88 is there any update on a timeline for this? This is a usecase we are very interested in as well and is a key component missing from our integration steps

shashankawasthi88 commented 1 year ago

@steve-dev-auto @oisinmcl-post - there is no need for a schema to start with in API Builder. You can go about creating an API object and add collections to it. Idea is that the API object represents your API in some form, it can either be schema or collection or both. Once you have the API object in place, you can connect it to your source code repository and ensure your API progress alongside your code.

oisinmcl-post commented 1 year ago

@shashankawasthi88 @steve-dev-auto so what you have mentioned is a valid workaround to this? So we can have an empty API that has no schema or definition, and add collections to it? In effect, creating a dummy API as a way of syncing our collections to DevOps?

ckurban commented 3 months ago

@steve-dev-auto @oisinmcl-post did you find a way or workaround to it? Has anyone tried the above-suggested dummy API solution? I would be interested to hear if anyone found a way as I am facing the same issue...