Hi! I am Ananya Uppal and I’m a second-year student pursuing B.Tech in PES UNIVERSITY, RR Campus, Bangalore. I would like to discuss a new idea I had about Parallelising multiple requests inside a given collection.
Right now, When we run a collection inside postman-runtime and every request is executed serially. We can enhance this to run different requests in a given collection parallelly. There are two major things to take care of:
- Requests can be dependent on each other:- One request might be setting some variable that is being used by some other request.
- The number of threads should be mentioned by the user
For 1), We need to make a graph where if one request (let say R1) is using some variable, which is set by another request (say R2), Then we can make an edge between R2 → R1. Once we have made this graph, using topological sort, we can easily find out which requests will be run parallelly. We can incorporate the order specified by the user also in this.
One more thing here, this can be implemented at Newman level also (if not postman-runtime level) and we can incorporate Idea 1 (Running Single request by Newman) in this.
Just wanted to check with mentors if this is a valuable addition?