我目前有一个测试计划,包含以下片段:
Thread Group
- Simple Controller
- Once Only Controller
- Login type 1 (Simple Controller)
- Login type 2 (Simple Controller)
- Simple Controller
- Sampler
- Sampler
我希望每个线程在通过一次仅控制器时选择一种登录类型。因此,例如,我希望 70% 通过登录类型 1(但不是登录类型 2),而另外 30% 通过登录类型 2(但不是登录类型 1)。我将如何实现这一目标?
答案 0 :(得分:1)
您可以添加 Throughput Controllers 作为登录采样器的父级,并指定您希望它们多久执行一次
Thread Group
- Simple Controller
- Once Only Controller
- Throughput Controller, Based on: Percent Executions, Throughput: 70%
- Login type 1 (Simple Controller)
- Throughput Controller, Based on: Percent Executions, Throughput: 30%
- Login type 2 (Simple Controller)
- Simple Controller
- Sampler
- Sampler
更多信息:Running JMeter Samplers with Defined Percentage Probability