Hello Stephane (or whoever can give some insight, perhaps philosophical, on this),
while searching for a clean way to pass data from a before clause or between separate scenarios, i ran across one thread called “share connection between several scenarios”, among others.
Sounds like there is no straightforward way to pass data between scenarios in Gatling.
In fact, in that thread, one of Stephane’s answer is:
We don’t support this use case out of the box, (IMHO, more of a functional test than a stress test).
My question is “why not?”, why is it functional and not stress… could you expand or elaborate on that answer…?
I am curious about it, because now i am questioning our use of Gatling with our microservices, maybe using it outside of its pertinent use cases.
On one end i can see why this is outside of Gatling responsibilities, but in practice, most of the scenarios are going to entail some login or some tokens that need to be provided before the test at hand.
I guess in the end what i am asking is: are we using the wrong tool for the job of load-testing a specific microservice or service call that needs some “before{}” set up?
Is Gatling designed only for mimicking entire user scenarios (all the way, say, from the login) and not so much for “unit-like” performance testing of smaller portions of functionality?
When doing performance testing, should we always test the system in its entirety (be it an open or closed workload system) and not sub-portions of it, perhaps?
Or maybe am i missing something, because i was not able to pass data to the scenario from the before clause… but if that’s the case, what is the purpose or the typical use of a before clause?
Max