kulya / jmeter-gradle-plugin

Other
40 stars 27 forks source link

Run Jmeter in non GUI Mode #33

Open asgheralishaik opened 9 years ago

asgheralishaik commented 9 years ago

I am trying to run jmeter in non GUI mode..trying to use this gradle jmeter plugin for running jmeter in non GUI mode.

I would like to run th following command:-

jmeter.bat -t .jmx -n -l /data/jmeter/concurrent/concurrent-test-results.csv

Can we do this using this plugin.

Appreciate any help on this.

foragerr commented 9 years ago

Anything you can do with jmeter on the command-line should be possible with this plugin. You can define most of these values in a properties file and add the properties file to your gradle test by adding this following to your gradle build script:

jmeterRun.configure {
    jmeterTestFiles = [file("pathtoJMXfile/jmxfile.jmx")] //-t 
    jmeterPropertyFile = file ("/pathtoFile/user.properties") //-p
    reportDir=file("pathtoResultsDir") //sort of -l, except filename is autogenerated
}

If you want to specify the results filename as well, you can define property log_file in the properties file pointed to by jmeterPropertyFile For other properties you can set in the properties file, read the comments in jmeter.properties and user.properties in your jmeter bin folder.