Looking at the code in the Pre-request Script and Test tab from Teams Workspace

I am writing some tests in postman, and we have purchased Postman Pro version and the feature of sharing your collection is pretty good, My team can run the Postman collection that I shared but cannot look at the code I am writing in the Pre-request Script and Tests tab. I would want them to look at my code to give me feedback on my test. I don’t want to publish my test, just want to share with the team.

What currently happening for code review purposes, they have to import the postman collection.json to their postman app to look at my test code which is an inconvenient and most people are opting not to review my code as they need to do pre-processing for code review.

is there a way from the ‘Team workspace’ they can look at the code written for the tests apart from running it?

Hey @Pushyamig! When you share a collection in a team workspace you can give your colleagues either “read” or “read and write” privileges. In the app, if you look on the bottom-right side you should see a button called BUILD - if you click on it, you can select BROWSE to view your collections in the workspace and click the ... to modify permissions. In this case, you do not need to publish your collection for your team to access your pre-request scripts and tests, you just need to share the collection to a shared workspace.

Whatever permissions your teammates have, they should be able to view the entirety of a shared collection, so this may be a sync discrepancy. I recommend removing the collection from the shared workspace (so that it is just in your private one), then re-sharing it to that workspace. If those tabs are still not populating, please email us via our Help Center :woman_technologist:t3:

1 Like

@claire Thank you for the suggestion, my problem is fixed. I see my team can see the test I have written. I totally missed the “Browse” and “Build” option in the bottom right so the default view for the Team workspace is Browse and not build so that I missed.

I got admin permission in the process to the Teams workspace. So I don’t know what worked. is it needed to have admin permission to share the entirely of my collection, I feel it shouldn’t.

Good to hear it’s working! And no the admin role is not required to share your collections, just “user”. This may have been a sync blip that coincidentally resolved itself around the same time you got those extra permissions. If it happens again, please let us know via our Help Center so we can take a closer look at the logs for your team :slightly_smiling_face: