I want to be able to define the distribution of scenarios for a given simulation. I currently have four scenarios; lets call them a, b, c, and d. In a config file I have a percentage listed for each. In my simulation class I then inject each one using the setup method, like so:
setUp(
injectScenario(a, ausers, ramp, dur),
injectScenario(b, busers, ramp, dur),
injectScenario(c, cusers, ramp, dur),
injectScenario(d, dusers, ramp, dur)
).protocols(httpConf)
The method injectScenario injects the users over a ramp/duration interval and then returns a PopulationBuilder. Everything works great except if I have a scenario for which I want 0 users (or 0 percent). I get an error that user has to be greater than zero. I am trying to figure out a way to not inject that scenario if the user count is not greater than zero. Is there a way I can add scenarios without doing it via the
setup method? Is there another mechanism for injecting dynamic scenarios?
Thanks
-Gary