I have scenario with multiple payments. My scenario ends with
[…]
.randomSwitch(
10 → exec(ScenarioPayments1.chain_payment1),
10 → exec(ScenarioPayment2.chain_payment2),
20 → exec(ScenarioPayment3.chain_payment2),
10 → exec(ScenarioPayment4.chain_payment4),
20 → exec(ScenarioPayment5.chain_payment5),
20 → exec(ScenarioPaymen6.chain_payment6),
10 → exec(ScenarioPaymen7.chain_payment7)
)
}
setUp(
scn_payments.inject(
atOnce(101 users)
).protocolConfig(httpConf)
)
}
But seems, that all users do all payments without any random. So they all do first payments, than second and etc.
Does randomSwitch works in Gatling2 ???
When i tested with Gatling 1.5 randomSwitch works perfectly.
But in test 6 users do payment1 and than same 6 users do payment2
I expect, that 6 user will login on site, 3(or 4, 0or2) will do payment1, and other 3 will go straight to payment2
I don’t get it: you execute payment1 and payment2, both directly and inside a randomSwitch, so users will do payment1, then payment2, then 50/50 payment1 or payment2 (and I expect those to fail as the users have just logged out).
In this scenario 100 users do 100 payments, so each user do 1 payment.
Is there any possibility, that each user will do all 5 payments, but in random sequence. So each user after login will do 5 payments in random sequence and logout.
Is there possibility, where I can tell, that each user have to make 3 random payment during one session.
First of all, you don’t have to write “exec(ScenarioPayments1.chain_payment1)”, ScenarioPayments1.chain_payment1 is probably already a chain and would be enough.
Hadn’t thought of this use case, so there’s no immediate built in, but definitively doable.
Do you want distinct payment types?