How to Exit the simulation when a scenario is failed in simulation setup.

Hi All,

I am trying to simulate load with multiple scenarios with diff protocols that are executed sequentially.

How do I exit the simulation when scenario 1 is failed / execute scenario 2 conditionally?

Example:

val scn1 = scenario(“Http_protocol_scenario1”)
.exec(dosomething)

val scn2 = scenario(“JMS_protocol_scenario2”)
.exec(dosomething)

setUp(

scn1.inject(atOnceUsers(1)).protocols(httpprotocol)
.andThen(
scn2.inject(atOnceUsers(10)).protocols(JMSProtocol)
)
)

P.S: I am using the Gatling version of 3.4.0-M1 to be able to execute the scenarios sequentially.
https://github.com/gatling/gatling/issues/3830

Thank you.

I don’t think that’s possible: even if you find a way to bypass scn2’s content depending on what happens in scn1, scn2’s injection profile will still be starting users as planned.

Note: 3.4.0-M1 was an internal milestone released for a customer. It’s definitely not a stable release and is known to be buggy. Not for public use.