问题描述
顺序场景 还可以使用 andThen 链接场景,以便在父场景中的所有用户终止后子场景开始。
setUp(
parent.inject(injectionProfile)
// child1 and child2 will start at the same time when last parent user will terminate
.andThen(
child1.inject(injectionProfile)
// grandChild will start when last child1 user will terminate
.andThen(grandChild.inject(injectionProfile)),child2.inject(injectionProfile)
)
)
但是下面的代码不能编译:
setUp(
scenario("A").inject(atOnceUsers(1))
.andThen(scenario("B").inject(atOnceUsers(1)))
)
编译错误:
type mismatch;
found : io.gatling.core.structure.PopulationBuilder
required: io.gatling.commons.validation.Validation[io.gatling.core.structure.PopulationBuilder] => ?
.andThen(scenario("B").inject(atOnceUsers(1)))
^
我使用的是 gatling 3.3.1
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)