在JMeter中顺序运行多个线程组 [英] Running multiple Thread Groups sequentially in JMeter

查看:1289
本文介绍了在JMeter中顺序运行多个线程组的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个测试计划,其中有多个线程组.
我想按顺序运行所有线程组.
线程组如下:

I have a Test plan in which there are multiple Thread Groups.
I want to run all of the Thread Groups sequentially.
Thread Groups are as below:

Thread Group1
Thread Group2
Thread Group3
. . .
Thread GroupN

我在互联网上的不同博客和文章中读过,人们声称线程组将按照它们定义的顺序运行,但显然,在我看来,它们不是.线程组4在线程组1之前运行.线程组4正在生成错误的报告,因为它在线程组1之前运行.

I've read in different blogs and articles on the internet, people claiming that the thread groups will run in the order they are defined but apparently they are not in my case. Thread Group4 runs before Thread Group1. Thread Group4 is generating a report which is wrong because it runs before Thread Group1.

如何确保线程组的顺序?

How do I ensure the ordering of my Thread Groups?

此外,我需要实现以下方案:

Also, I need to implement the following scenarios:

  1. 由一个用户多次运行一个请求(单个用户应从一个HTTP请求创建1000个帐户).

  1. Run a single request multiple time by a single user (Single user should create 1000 accounts from a single HTTP request).

同时由多个用户运行多个请求(多个用户应从一个HTTP请求同时创建1000个帐户).

Run a multiple requests multiple times by multiple users simultaneously (Multiple users should create 1000 accounts simultaneously from a single HTTP request).

该怎么做?

PS:在回复之前,请仔细阅读并理解查询内容.

PS: Please read and understand the query carefully before replying.

推荐答案

关于在测试计划中连续执行线程组:在Run Test Group consecutively复选框. org/usermanual/component_reference.html#Test_Plan"rel =" noreferrer>测试计划配置屏幕:

Concerning consecutive execution of thread groups in test plan: simple check Run Test Group consecutively check-box on the Test Plan configuration screen:

  1. 使用例如循环控制器:

Thread Group
Number of Threads = 1
Loop Count = 1
  ...
  Loop Controller
  Loop Count = N
      HTTP Request
  ...

甚至没有循环控制器但没有那么灵活的架构:

or even schema without Loop Controller but not so flexible:

Thread Group
Number of Threads = 1
Loop Count = N
  ...
  HTTP Request
  ...

  • 为此使用标准线程组的Number of Threads属性以及Ramp-Up Period属性:

  • Use Number of Threads property of standard Thread Group for this together with Ramp-Up Period property:

    Thread Group
    Number of Threads = N
    Ramp-Up Period = 0
    Loop Count = 1
      ...
      HTTP Request
      ...
    

    这将启动N个同时执行同一场景的线程.

    This will start N simultaneous threads executing same scenario.

    这篇关于在JMeter中顺序运行多个线程组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

  • 查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆