0
votes

Currently we are using Performance Center for the load test,eventually we will move to JMeter.

In Performance center we ran 200 scripts together.

In the Same way ,How to run multiple jmx scripts together in JMeter?

3
Do you mean you ran the same script 200 times, or run 200 different scripts in parallel? JMeter can do it both ways, please clarify.CharlieS
Hi Charlie, 1.200 different scripts 2.Total no.of users : 451 3.Test duration is:2 hrs 15 mins 4.Assign individual no of users for each script I.e Script1: 8 users;script 2: 4 users; script 3:1 user soo on... How do I do this in JMeter? Thanks, Rajrpagadala

3 Answers

4
votes

You can use JMeter Ant Task or JMeter Maven Plugin to kick off tests execution. Both tools have capabilities to execute tasks in parallel.

If needed you can merge execution result files with MergeResults plugin.

For more options on how JMeter test can be started refer to 5 Ways To Launch a JMeter Test without Using the JMeter GUI guide.

3
votes

Using non-ui mode you can run multiple jmx scripts by providing -t option like,

Jmeter.bat or Jmeter.sh -n -t scritp1.jmx script2.jmx ... 

or create multiple sessions using a wrapper script in shell or batch pgming which will run those scripts in parallel

like,

Jmeter.bat or Jmeter.sh -n -t scritp1.jmx &
Jmeter.bat or Jmeter.sh -n -t scritp2.jmx &
3
votes

The easy way is to start all the scripts from the command line at the same time and have each script programmed with number of users, etc. I use Windows, and create a batch file containing multiple lines like:

start /REALTIME java -jar ApacheJMeter.jar -n -t test_script1.jmx -l results1.jtl -j log1.log -Dthreads=40 -Dduration=1800

However, for the scale of your setup, I would recommend you look into a better method of controlling your testing through automation.

I have set up a Jenkins server, which is able to run JMeter scripts using maven, or shell scripts, and then aggregate results, create graphs, etc. It is able to trigger jobs in parallel, sequence, randomly, or triggered by other events.

I would also look at setting up your scripts to use properties for number of threads, loops and duration, so you can control them easily from Jenkins without modifying the scripts. Create a User Defined Variables config element, and copy property values to variables, setting defaults, ie:

THREADS    ${__P("threads", 25)}

This will mean ${THREADS} can be used in the thread group, and will be default value 25. If you assign a value on the command line it will be used instead of default. You can define it on the JVM command line, when you start JMeter like this:

-Dthreads=40

In your script, the value of ${THREADS} will now be 40.