I try to do distribution with .doSwitch(), but selection works only once.
for example:
`
def getDistribValue () : String = {
var tempRandom = random.nextInt(100)
if (tempRandom < 60) return “1”
else if (tempRandom < 69) return “2”
else return “3”
}
val scn = scenario(“name”)
.doSwitch(getDistribValue ())(
1->exec(…),
2->exec(…),
3->exec(…)
)
setUp(scn.inject(
rampUsers(10) over(60))
.protocols(
http
.shareConnections
.disableCaching))
`
if getDistribValue() returned “1” scenario will be performed only once with value “1”.
How to avoid it? Am I using the wrong method to implement distribution?