Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
717 views
in Technique[技术] by (71.8m points)

testing - Running multiple Thread Groups sequentially in 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

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. Run a single request multiple time by a single user (Single user should create 1000 accounts from a single HTTP request).

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

How to do so?

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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

enter image description here


  1. Use e.g. Loop Controller for this:

    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
      ...
    
  2. 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
      ...
    

    This will start N simultaneous threads executing same scenario.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...