I am trying to put load from my java application using Apache's JMeterUtils. I am new to Jmeter , I am a bit confused about the values I should put in to acheive 72k load in 2hours.
load.throughput.max=100 (load put per sec ?)
load.thread-count-in-group=25 (total number of threads runnings)
load.duration.seconds=7200 (load will run for 2hours)
load.ramp-up.duration.seconds=20 (time to bring all threads up)
Is my understanding correct about these properties ? I was referring to below documentation JMeterUtils but was not able to find any thing about these properties. Can somebody please correct me if I am wrong in my understanding.
I don't think you will be able to "put load" using JMeterUtils, it's just a helper class which allows you to set and get JMeter Properties
The "load" is generated by the Thread Group where you can set the desired number of threads (virtual users), ramp-up period, number of iterations, duration, etc.
Once started each thread begins executing Samplers as fast as it can.
So if you need to execute 72000 requests in 2 hours with 25 users you need the following setup:
Thread Group with 25 users, unlimited iteratinos and 2 hours duration:
A Sampler which will be executing the real work, i.e. sending a request to the system under test. A very minimal one which sends simple single GET request to http://example.com is below
A Constant Throughput Timer to limit JMeter to send requests at 10 requests per second rate
If you need to start the test from your Java application you can either run an existing .jmx script like outlined above using StandardJMeterEngine class or create the test from scratch using relevant JMeter API classes (ThreadGroup, TestPlan, HTTPSamplerProxy, etc.)
If you want to use properties which are set by your JMeterUtils class you can use __P() function like
${__P(load.thread-count-in-group,)}