-
Notifications
You must be signed in to change notification settings - Fork 117
Add concurrency (parallel runs) support #867
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
I hope this PR gets some attention! 👍 Newman would benefit so much from running the tests concurrently! |
@halfzebra I already reviewed this PR once, great work by @duddu 👏 Changes made are in the right direction but currently, we haven't thought of how parallel runs will be baked into the app. Got busy with other stuff, will review this PR soon! 😅 |
Thanks for your reply! 👍 I feel like Using Postman App for load testing would be super cool, but I've been assuming this wasn't the use-case @duddu had in mind. Looking forward to this feature! |
@halfzebra thanks for your support |
@codenirvana really happy to know you are looking at this! Though, in my opinion working on the Newman side of the thing and getting the code properly just from a cli point of view, would still be a precondition for any work on the app. And after that we can take all the time needed to understand how (and whether) to plug this in the client ui; it doesn’t need to be be done all together! Clearly, this makes sense ONLY if there is no other current plan to handle concurrency outside the runtime code (e.g. with partnerships with cloud services providers... 🤭). |
ad9609f
to
12b6e5c
Compare
@codenirvana Any updates? Looking for an API testing solution for our company, thought Postman would cut it but it seems like
|
Any news on doing load testing with Postman / newman? 😅 |
I'm not a maintainer of this project, just wanted to share some of my findings hoping they could help. If there is a need for running multiple collections concurrently, I'd advise looking into implementing a test script on top of newman, this is what I did for our testing setup at work and it worked well. The intended workflow assumes that users want to run requests in a collection sequentially. As far as I understand, Runscope competes with Postman and they also focus on sequential runs for requests, so it looks like it's not a part of "intended" functionality and it might take a while to adopt it. Still hope this gets picked up, there's plenty of situations where requests inside collections can be executed concurrently, which would speed up a bunch of collections a lot! |
This is to enable concurrent runs for a collection.
Premise
I love Postman, and the work that you guys have being doing with newman and this library is outstanding. I hate the fact that I have to use other horrible and obsolete software to run my performance/load tests, when I already would have everything I need with newman.
I appreciate that maybe if you never put concurrency in this library it may be a decision, but I thought I might try anyway.
Description
At the moment there is no real support for concurrency, and the workaround proposed in the newman example for parallel runs puts javascript out of memory with a very small number of concurrent runs. Also, it makes impossible to aggregate the results in a proper way. It looks like there is no way to get anything really working while instantiating multiple runs.
I decided to try and keep everything within the single run start. There are very few changes of design; the most relevant is making cursor and queue into a collection rather than single object, and using the cursor reference as the identifier of the process (aka virtual user). This id gets propagated to all the downstream instructions scheduled, allowing to run concurrent processes on the same collection. In order to achieve this in a clean way, I moved the initialisation of cursors and queues from the waterfall init method into the run start.
Notes
There are still some possible optimisations to do, I didn't want to dig too deep without getting some feedback first. Please let me know what do you think; if this is something that even remotely you would be interested in supporting, I'm more than happy to adjust the changes following your advice, or even change completely the approach.
Todo