I have created some test plans in Jmeter. Now I need to run them trough command line or java API.
Can anyone please suggest any links or examples on from CLI/JAVA API how to:
In addition to previous comment on how to run JMeter in non-GUI mode, number of threads can be passed as JMeter property as follows:
In Thread Group set "Number of Threads" to be
and set it as
jmeter -Jusers=50 -n -t Test_Plan.jmx -l results_folder\log.jtl
See Apache JMeter Properties Customization Guide for more details.
In regards to running JMeter test from Java code refer to this thread.
For running JMeter scripts from Apache Ant there is JMeter Ant Task
For running JMeter by Maven there is a JMeter Maven plugin
There is also Jenkins plugin if you want to integrate it with Jenkins/Hudson