首页 文章

JMeter - 并行加顺序线程组在同一测试计划中执行

提问于
浏览
1

我有这样的jmeter测试计划,

Test Plan
  Thread Group1
  Thread Group2
  Thread Group3
  Thread Group4

我的测试计划配置设置为并行运行所有线程组

Test Plan Configuration

这里我想执行 Thread Group1 然后 Thread Group2 顺序执行 Thread Group3 然后 Thread Group4 但是 Thread Group1Thread Group3 并行

那么有没有办法将 Thread Group1Thread Group2Thread Group3 组合在一起 Thread Group4 以顺序运行?

我知道这个非常奇怪的要求,但我必须忍受它,提前感谢你的帮助,谢谢 .

1 回答

  • 3

    我在这里看到3个选项:

    • Use schedule 允许您以组1和组3同时运行的方式安排4组,组2和组4安排在1和3完成后运行 .

    • Run them using 2 JMeters :在一个JMeter中,你将 Thread Group1Thread Group2 ,在另一个 - Thread Group3Thread Group4 . 每个JMeter将被配置为按顺序运行线程组,但两者将并行运行,因此 Thread Group1Thread Group3 将并行运行

    • Change test setup, so that there are 2 thread groups

    • 线程组A组合 Thread Group1Thread Group2

    • 线程组B结合 Thread Group3Thread Group4

    Thread group AThread group B 内,您可以使用循环控制器来实现特定的迭代次数,而不是在线程组级别上循环 . 即:

    Thread Group A
        Loop Controller [Count = same count as was used for Thread Group1]
            all samplers of Thread Group1
        Loop Controller [Count = same count as was used for Thread Group2]
            all samplers of Thread Group2
    Thread Group B
        Loop Controller [Count = same count as was used for Thread Group3]
            all samplers of Thread Group3
        Loop Controller [Count = same count as was used for Thread Group4]
            all samplers of Thread Group4
    

相关问题