usage of doIfOrElse in gatling

how to implement the below in Gatling, we tried with doIfOrElse but it is executing only the first function, i want to execute all the function based on the condition… can any one help one this

.doIfOrElse (Randnr >=1 && Randnr <= 2)






can any one help on this

I like to run the function inside the curly braces based on random number.but it is executing the last function only.
which one have to be used it for gatling to execute multiple function like javascript

val scnPostAndGet = scenario(“Post and get”)
.exec(Read_HDAS_Data, Hdas_location, Hdas_Token)
.doIfOrElse(_ =>rnd<= 1)


Thanks in Advance

can any one answer on this please.

  1. How to run Gatling from agent machines? it got implemented?

Wrong usage.

A scenario is a chain, and what’s chained in {abc;xyz;mainpower} is what’s returned by this block, hence the result of the last instruction: mainpower. So abc and xyc are just instanciated once when the scenario is built, and discarded.
Use exec to chain them.

Commercial product

2.For commercial edition(Gatling Agents) can we let us know the charges.


Regarding FrontLine, please get in touch at