What is the simplest way to execute different collections in parallel with newman? On local machine. Right now we do it on Jenkins but I want to try on my computer before push.
I have different collection under different folders(but the same root folder) and I’m run them with this command in .bat script for /r %%f in (./*) do newman run %%f -e Environment.json --bail
but it’s ‘single thread’.
So , how to run all those collections in parallel? I want to cut execution time.
I’ve followed a similar thing by doing this your colleague @matt did however I have an issue with the environment variables. Basically I want to run the same collection in parallel but with a different value as environment variable. I therefore did that
and they are supposed to call URL with a different value such as {{api_base_url}}/activities/{{activityUuid}}
how ever it seems that the run are using the same value. It is possible that environment variables are shared between runs? If yes could you tell me how can I set dynamically a value such as a part of the URL path without altering others runs?
@aurelien.lair it looks like you might only be sharing an excerpt of your script as it matches neither the example @jetison provided or the gist out on my GitHub. If you’re specifying different environment files/objects, it should definitely not be using the same one - the snippet you included looks like just a singular Newman run however.
Hi Matt,
thanks for answering me. What I am doing is to loop on an array of objects and to prepare a set of commands to run. The collection is the same but I’d like to change the environment variable within each command so that each command has its own URL like
{{api_base_url}}/activities/{{activityUuid}}
By doing this it seems that the environment variable is not different hence the URL is the same…