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)
{

CreateException_Zone;
CreateException_Idling;

CreateException_IdlingSummary
}

{

CreateException_LowBattery;
CreateException_Stop

}

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)
{abc;xyz;mainpower}

{lkg;skm;immidiate}

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.

Hi,

Regarding FrontLine, please get in touch at contact@gatling.io.

Cheers,