gatling - Gatling 设置顺序场景
问题描述
加特林文档状态 :
顺序场景 也可以使用 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)))
^
我正在使用加特林 3.3.1
解决方案
推荐阅读
- r - ggplot中的小提琴绘图宽度
- python - 检查对象的最佳方法是 Cython 中的枚举?
- php - Laravel Storage 无法在 Windows 中找到文件
- javascript - 如何从javascript中的url中提取参数
- python - 为什么我的函数返回错误的值?
- html - 从网页上的选择列表中选择选项后,VBA 运行事件
- react-virtualized - 使用 React Virtualized 打破大行高度?
- android - Android APP - 拨打电话号码 net::ERR_UNKNOWN_URL_SCHEME
- android - View上的Android点击监听器以奇怪的方式工作
- node.js - Passport 获取刷新令牌 OAuth