Search code examples
multithreadingjmetermaster-slave

How to run each thread on a slave at the same time and save results on same .jtl file


i have a test plan that contains 3 threads (test scenarios) and each one read from csv file. how can i run each thread (test scenario) on a different slave at the same time and save results on one .jtl file?

the below command will run the whole test plan on all slaves and save results on one .jtl file:

jmeter -n -t InvoiceQ.jmx -l results.jtl -R 172.60.130.38,172.60.130.39,172.60.130.40

i need to run each thread on a slave and have one results file.


Solution

  • As per JMeter documentation:

    If the test uses any data files, note that these are not sent across by the client so make sure that these are available in the appropriate directory on each server.

    So just copy the CSV file onto all slave machines. JMeter master will collect the metrics from the slaves and store them into results.jtl file.

    It's also possible to use plugins like HTTP Simple Table Server or Redis Data Set Config, in this case you won't need to copy the CSV file with test data to the slave machines

    More information: How to Perform Distributed Testing in JMeter