'Jmeter - How to run the same thread group but with different properties consequentially using command line
What I want to achieve is:
I only have one thread group and the only thing that changes are the Thread Properties

I want to run more than one thread group sequentially, and for each thread group have different configurations.
To run just the first one: ./jmeter -n -t loadTest.jmx -JTHREADS=1 -JRAMPIPSECONDS=1 -JDURATIONSECONDS=300
Now I want to add a 5 min delay and start a new thread with new parameters, but using the same command line, so I don't have to manually update the properties.
Solution 1:[1]
Refer to your operating system documentation, i.e. sleep command and && operator i.e.
./jmeter -n -t loadTest.jmx -JTHREADS=1 -JRAMPIPSECONDS=1 -JDURATIONSECONDS=300 \
&& sleep 300 \
&& ./jmeter -n -t loadTest.jmx -JTHREADS=new-number-of-threads -JRAMPIPSECONDS=new-ramp-up -JDURATIONSECONDS=new-duration \
&& sleep 300 \
etc.
More information on command-line executing of JMeter: How Do I Run JMeter in Non-GUI Mode?
Solution 2:[2]
You need to create a separate properties file(s) for your requirement.
i.e, loadtest.properties, baseline.properties
Insert all your variables and its values in it . i.e,
THREADS=1
RAMPUPSECONDS=2
then pass the required property file using -q option to apply it to JMeter test run
e.g: jmeter -n -t loadTest.jmx -q loadtest.properties
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Dmitri T |
| Solution 2 | rollno748 |
