Zooz / predator

A powerful open-source platform for load testing APIs.
https://zooz.github.io/predator/
Apache License 2.0
576 stars 109 forks source link

Backend: Run "before" stage only once when job parallelism > 1 #468

Open NivLipetz opened 4 years ago

NivLipetz commented 4 years ago

Is your feature request related to a problem? Please describe. Currently whenever a job with parallelism > 1, Predator spins up multiple Predator-Runners to run the load. If a before stage is configured in the test, then this before stage will run in each predator-runner meaning that the before stage will run ${parallelism} times

Describe the solution you'd like Run the before stage only once regardless of how many runners are spun up. Once finished successfully, pass any created variables from the before stage to the rest of the test. If in the run of the before stage any request fails or receives a status_code != 2xx, fail the run

This feature's design is open for discussion and for contributions 😁

enudler commented 4 years ago

a very interesting feature, I would say that we will need a special runner that will run only the before section and submit before params to predator, then predator will spin up all parallel runners.

NivLipetz commented 4 years ago

We need to think about how we enable this special runner to run only the before stage because currently the before stage is implemented inside artillery and how it runs the tests. We might have to patch the artillery code for this.