I am running jmeter distributed test with 1 master, 1 slave and using Ultimate thread group, so created property files (target-file.properties) to pass the values spawn values.
I have copied the target-file.properties file into the slave server along with the test data.
but the values from properties file are not getting picked up while running the test.
target-file.properties contains below values
####################Custom load profile values######################################################
# Properties added to manage loopCount inside the thread groups
loop-count-xxx-controller=2
loop-count-xxxxx-controller=2
loop-count-xxxx-controller=2
loop-count-xxxxxx-controller=2
\#load profile
\#spawn(threadsCount, initialDelay, startupTime, holdLoadFor, shutdownTime)
threads_schedule=spawn(2,0s,100s,1900s,10s) spawn(2,20s,130s,1860s,10s) spawn(2,40s,160s,1830s,10s) spawn(2,60s,190s,1800s,10s)
Started jmeter-server on the slave machines and Ran distributed test from master with following command
./jmeter -G --addprop /tmp/target-file.properties -n -Gtest-data=/tmp/datafiles/users.csv -Gpng-file=/tmp/datafiles/screenshot.PNG -t /tmp/resources/complete-test-plan.jmx -l output5.jtl -R XX.XXX.XX.XX
I'm getting garbage value in the summary
Creating summariser <summary>
Created the tree successfully using /tmp/resources/complete-test-plan.jmx
Configuring remote engine: XX.XXX.XX.XX
Using local port: 4000
Starting distributed test with remote engines: [XX.XXX.XX.XX] @ Mon Dec 05 10:19:48 GMT 2022 (1670235588651)
Remote engines have been started:[XX.XXX.XX.XX]
Waiting for possible Shutdown/StopTestNow/HeapDump/ThreadDump message on port 4445
summary = 0 in 00:00:00 = ******/s Avg: 0 Min: 9223372036854775807 Max: -9223372036854775808 Err: 0 (0.00%)
Tidying up remote @ Mon Dec 05 10:19:50 GMT 2022 (1670235590782)
I checked the jmeter-server.log file of the slave server and found that values in target-file.properties are not being passed to slave server but the properties files are being applied . Below is the log info for same:
2022-12-05 10:50:09,011 INFO o.a.j.s.FileServer: Default base='/opt/apache-jmeter-5.2.1/bin'
2022-12-05 10:50:09,014 INFO o.a.j.s.FileServer: Set new base='.'
022-12-05 10:50:09,022 INFO o.a.j.e.StandardJMeterEngine: Applying properties {png-file=/tmp/datafiles/screenshot.PNG, --addprop=/tmp/target-file.properties, test-data=/tmp/datafiles/users.csv}
2022-12-05 10:50:09,022 INFO o.a.j.e.RemoteJMeterEngineImpl: Running test
2022-12-05 10:50:09,026 INFO o.a.j.e.StandardJMeterEngine: Running the test!
2022-12-05 10:50:09,026 INFO o.a.j.s.SampleEvent: List of sample_variables: []
2022-12-05 10:50:09,032 INFO o.a.j.e.u.CompoundVariable: Note: Function class names must contain the string: '.functions.'
2022-12-05 10:50:09,032 INFO o.a.j.e.u.CompoundVariable: Note: Function class names must not contain the string: '.gui.'
2022-12-05 10:50:09,837 INFO o.a.j.e.StandardJMeterEngine: Starting ThreadGroup: 1 : Disrupt SC PerformInterview
2022-12-05 10:50:09,838 INFO o.a.j.e.StandardJMeterEngine: Starting 0 threads for group Disrupt SC PerformInterview.
2022-12-05 10:50:09,838 INFO o.a.j.e.StandardJMeterEngine: Thread will start next loop on error
2022-12-05 10:50:09,838 INFO k.a.j.t.AbstractSimpleThreadGroup: Starting thread group number 1 threads 0
2022-12-05 10:50:09,838 INFO k.a.j.t.AbstractSimpleThreadGroup: Started thread group number 1
2022-12-05 10:50:09,838 INFO o.a.j.e.StandardJMeterEngine: Starting ThreadGroup: 2 : Disrupt SC RequesForEvidence
2022-12-05 10:50:09,838 INFO o.a.j.e.StandardJMeterEngine: Starting 0 threads for group Disrupt SC RequesForEvidence.
2022-12-05 10:50:09,838 INFO o.a.j.e.StandardJMeterEngine: Thread will start next loop on error
2022-12-05 10:50:09,838 INFO k.a.j.t.AbstractSimpleThreadGroup: Starting thread group number 2 threads 0
2022-12-05 10:50:09,838 INFO k.a.j.t.AbstractSimpleThreadGroup: Started thread group number 2
2022-12-05 10:50:09,839 INFO o.a.j.e.StandardJMeterEngine: Starting ThreadGroup: 3 : Disrupt SC RecordDecision
2022-12-05 10:50:09,839 INFO o.a.j.e.StandardJMeterEngine: Starting 0 threads for group Disrupt SC RecordDecision.
2022-12-05 10:50:09,839 INFO o.a.j.e.StandardJMeterEngine: Thread will start next loop on error
2022-12-05 10:50:09,839 INFO k.a.j.t.AbstractSimpleThreadGroup: Starting thread group number 3 threads 0
2022-12-05 10:50:09,839 INFO k.a.j.t.AbstractSimpleThreadGroup: Started thread group number 3
2022-12-05 10:50:09,843 INFO o.a.j.e.StandardJMeterEngine: All thread groups have been started
2022-12-05 10:50:09,843 INFO o.a.j.e.StandardJMeterEngine: Notifying test listeners of end of test
2022-12-05 10:50:09,843 INFO o.a.j.s.DataStrippingSampleSender: Test Ended on XX.XXX.XX.XX
2022-12-05 10:50:09,843 INFO o.a.j.s.BatchSampleSender: Test Ended on XX.XXX.XX.XX
2022-12-05 10:50:09,858 INFO o.a.j.s.DataStrippingSampleSender: Test Ended on XX.XXX.XX.XX
2022-12-05 10:50:09,858 INFO o.a.j.s.BatchSampleSender: Test Ended on XX.XXX.XX.XX
2022-12-05 10:50:09,861 INFO o.a.j.e.StandardJMeterEngine: Test has ended on host XX.XXX.XX.XX
2022-12-05 10:50:09,864 INFO o.a.j.e.StandardJMeterEngine: Interrupting RMI Reaper
I'm not sure what is the wrong in my setup but the same setup of passing target-file.properties from command line is working in standalone testing.
Can you please tell me what I am doing wrongly?
You need to remove --addprop
from your command line and as -q
or --addprop
arguments are only processed on master node, you need to use -G
in order to propagate the properties "globally" to all slaves.
More information: