Hi all!
I’m using Gatling as a integration tool in a small Java program. The program take an arbitrary number of files where the request and checks are defined, it creates the appropriate scenarios and groups them in a single PopulationBuilder class.
Everything works fine, but every request is done at once, and I really need to make each request sequentially.
There is ChainBuilder
:
ChainBuilder request1 = request1.exec(...);
ChainBuilder request2 = request2.exec(...);
ScenarioBuilder scn = scenario("myscenario").exec(request1, request2);
And .andThen()
:
populationBuilder.add(scn1.injectClosed(...).andThen(scn2.injectClosed(...).andThen(scn3.injectClosed(...));
However, I couldn’t get the desired effect. It seems the andThen
threats every first ocurrence as the parent and the others as children at the same hierarchy level. The ChainBuilder I don’t know how I can put hundreds of scenarios there.
With a small number of requests it can work fine, but I need to work with several thousands. I’m using as a single setUp because it generates the aggregated report of all requests that is quite useful.
Anyone had a similar implementation or has a an idea how to put this together?
Cheers!