Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Configuring result file data when running JMeter in non-GUI mode

Tags:

java

jmeter

I'm currently running JMeter in Non-GUI mode via:

"apache-jmeter/bin/jmeter -n -t $testPlan.jmx -l results.jtl"

When the tests finish running, the results.jtl file contains something like this:

1379545163610,186,HTTP Request,403,Forbidden,Service 1-30,text,false,239,186

It appears that it's using a default configuration for what should be outputted, but what if I'm interested in seeing only the latencies per line instead this big csv value? I know that when you use JMeter in GUI mode, and when you add a new listener such as "View Results In Table", you can configure what exactly should be written to the resulting jtl file such as response code, latency, thread name, etc.

I just want the latency data, however. How can configure this through this command line instead of through the GUI?

Thanks!

like image 702
HiChews123 Avatar asked Sep 18 '13 23:09

HiChews123


People also ask

How do I run a JMX file in non GUI mode?

If you want to start Apache JMeter in non-GUI mode, use the following command line options: -n – non-GUI mode – this specifies JMeter is to run in non-GUI mode. -t – JMX file – location of the test plan and the name of JMX file that contains the Test Plan. -l – log file name of JTL file to log sample results to.

Which command option specifies JMeter is to run in non GUI mode?

4 CLI Mode (Command Line mode was called NON GUI mode) For load testing, you must run JMeter in this mode (Without the GUI) to get the optimal results from it. To do so, use the following command options: -n.


2 Answers

Update: The following is correct, but it's considered best practice to modify the user.properties file in order to avoid updates which may overwrite jmeter.properties (See the documentation).

Check out following set of properties in jmeter.properties.

#---------------------------------------------------------------------------
# Results file configuration
#---------------------------------------------------------------------------

# This section helps determine how result data will be saved.
# The commented out values are the defaults.

# legitimate values: xml, csv, db.  Only xml and csv are currently supported.
#jmeter.save.saveservice.output_format=csv

...
...
# Only applies to CSV format files:
jmeter.save.saveservice.print_field_names=true

print_field_names is by default false. Set it to true to figure out what column is what?

timeStamp,elapsed,label,responseCode,responseMessage,threadName,dataType,success,bytes,Latency
1379564790444,652,jp@gc - Dummy Sampler,200,OK,Thread Group 1-1,text,true,87,78
1379564791099,1,Debug Sampler,200,OK,Thread Group 1-1,text,true,1175,0

By the way that big value is timestamp in epoch, if you meant 1st field by big value.

like image 128
Manish Sapariya Avatar answered Oct 18 '22 21:10

Manish Sapariya


By default JMeter does not save any summary results to file. Either you have to save as JTL and view it in the summary listeners later or run with the summary listeners. I would rather suggest the first option, as the second will be a overhead for the JMeter. Also i have read an post on how few summary can be logged on console while running in non-GUI mode. Please read - http://developer.amd.com/community/blog/using-apache-jmeter-in-non-gui-mode/

like image 29
SSujesh Avatar answered Oct 18 '22 23:10

SSujesh