Passing a separate protocol configuration to each scenario of a multi-scenario simulation


Documentation contains an example in which separate protocol configs are passed to each scenario ( It seems that the API was changed during refactoring(e.g. Is there a way to pass a separate protocol config to each scenario in multi-scenario simulation ?

It’s back in master (we had feedback from the community after we did that change in 2M3a).

Cool! Is there a known workaround for 2M3a version ?

Вівторок, 25 лютого 2014 р. 22:00:07 UTC+2 користувач Stéphane Landelle написав:

Nope, sorry.

Was there any changes in custom protocol config API or example from docs should work? For some reason I’m still getting compilation errors when trying to use example from docs with snapshot version of Gatling.

What’s your problem exactly?

I have the following fragment:

setUp( => s.inject(atOnceUsers(1).protocolConfig(addScnName(scn)))).toList: _*

Which results in:

value protocolConfig is not a member of io.gatling.core.controller.inject.AtOnceInjection

Where testScenarios is an iterable with all scenarios and addScnName returns custom protocol config for the specified scenario (actually it just adds custom header with scenario name so all request of each scenario contain header with the corresponding name)

Many things wrong, the first one being that you should close inject() before trying to set up the protocols.
Then the method name is wrong:

Thanks, I just used documentation from . Seems like it’s bit outdated.

It’s for Gatling 1.
We’re currently working on the documentation for Gatling 2M4, such as