Use ReferencedRequest with local collection

Hello,

My scenario:

Currently, I am using referencedRequest scripts in order to use the collection runner with multiple requests in different folders.

E.g.:

Folder A:
-Login > Get all products.

Folder B:
-Login > Get specific product > Add Product to basket

As you see, both folders use login request, this is why I use referenced request approach, in order to do a change in the login request I have to do it only in one (the original) and not twice (in this scenario, but in real life there are like 100 folders).

The problem I am having is that this actual scenario is veeeeeeeeeEeeery slow. First, Postman uses the API key to get all the collections, then searches for my specific collection and then grabs the specific request and uses it. This process is consuming a lot of time on my machine and due to performance tests, we need to shorten this time.

What I need: Is there a way to instead of Postman grabbing the collection via web, it grabs it via stored local files on the computer?

Thank you have a nice day.

I donโ€™t think Postman will do exactly what you want here.

The way that Postman does this is by using the pre-request scripts which can be added at the request, folder or collection level but its not as intuitive as calling one test from another which is fairly basic functionality in most test automation tools. You would need to write it in code using sendRequest.

Another option would be to create a function for the login, which you can save as a global variable, which can then be run using the pre-request script and sendRequest from anywhere in a collection. This isnโ€™t very elegant either.

Your current solution of calling the Postman API to get the collection details is a novel way of doing this, but I can understand the performance hit on doing it this way.

I not aware of any โ€œsimpleโ€ way to achieve this, but I do understand the request. Pretty sure its not the first time this has been discussed.

I suspect this functionality is worthy of a feature request that you can submit on Postmanโ€™s Github.