Justin Holze
Justin Holze

Reputation: 181

Start JMeter thread after another thread

I want to run a thread x times. The thread group contains three samplers and because I dont want them to be mixed up in the result windows I only want to start the next thread when another is finished. I don't want to use a Ramp-Up Period because a thread could take 1 to 20 seconds.

Upvotes: 0

Views: 2228

Answers (3)

Bilal Demir
Bilal Demir

Reputation: 686

You can use "jp@gc - Ultimate Thread Group". The Ultimate Thread Group provides flexible thread scheduling to your test scenario. It allows us to create a scheduled thread with advanced configuration. Start Threads Count, Initial Delay, Startup Time and Hold Load Time can be defined separately for each record. You can define tasks to run consecutively.

This platform support flexible thread scheduling. You can read detailed wiki docs about the ultimate thread group.

Link: Loadium.com/wiki/ultimate thread

Upvotes: 0

Dmitri T
Dmitri T

Reputation: 168217

Your use case is not very clear, however if you need to limit JMeter to X concurrent threads only the most obvious choice would be going for the Concurrency Thread Group

Concurrency Thread Group

As per Advanced Load Testing Scenarios with JMeter Part 4 - Stepping Thread Group and Concurrency Thread Group article:

The Concurrency Thread Group provides a better simulation of user behaviour because it lets you control the length of your test more easily, and it creates replacement threads in case a thread finishes in the middle of the process.

You can install Concurrency Thread Group as a part of Custom Threads Group bundle using JMeter Plugins Manager


Regarding your three listeners bit, I would recommend reconsidering this approach as per JMeter Best Practices you should not be using any listeners, instead of it you need to run JMeter in non-GUI mode and use -l command-line argument to specify the results file name. Once your test is finished you can open the .jtl results file with a listener of your choice or generate a reporting dashboard from it.

Upvotes: 0

UBIK LOAD PACK
UBIK LOAD PACK

Reputation: 34566

You could use 3 thread groups and module controller (to referencd in the 2 other thread groups the elements in the first one to avoid copy ) and check on test plan the option:

  • Run Thread Group sequentially

Upvotes: 1

Related Questions