Thursday, May 11, 2017

Apache JMeter Non-GUI Mode Summary Outputs

Apache JMeter provides 2 modes of execution.
  1. GUI Mode
  2. Non-GUI Mode (Command line mode)
It is recomended to run JMeter in non-gui mode for load testing to get optimal results. But when running JMeter in this command line mode, there is a limitation that we can't monitor test results live in run-time.

But there is a solution for it for a some extent. That is we can see a summary of test statistics on the terminal (command line), once per configured time duration. This feature is enabled by default, and if we want to change its properties, we have to do it in <JMETER_HOME>/bin/jmeter.properties file. Following are the related 4 properties in this file for this non-gui summarize outs. Last 3 properties listed below are commented out by default as the comented out values are the default values.
summariser.name=summary
summariser.interval=30
summariser.out=true
summariser.log=true
Let's see what these properties do.
  • summariser.interval - the time interval the summary outputs are generated. This is in seconds. We may need to reduce or increase this value according tho the nature of our tests.
  • summariser.out      - set this to true if you want to display summary outputs                                    on the terminal.
  • summarizer.log      - set this to true if you want to include this summary                                          outputs on the jmeter log file.

After making required changes to these properties, run your test in non-gui mode and you will see a output similar to below. Note that the summary output entries are printed line by line once a given interval of time.


Fields in the summary outputs stands for below purposes.
e.g.
summary +   1127 in 00:00:06 =  200.4/s Avg:   133 Min:    58 Max:  2710 Err:  1127 (100.00%) Active: 20 Started: 20 Finished: 0
  • Field 1 : summary = means that is a cumulative report entry
                  summary + means that is for the relevant time period only
  • Field 2 : Number of threads  (e.g. 1127 )
  • Field 3 : Time period (e.g. 00:00:06 )
  • Field 4 : Threads per second (e.g. 200.4/s)
  • Field 5 : Average response time (e.g. 133)
  • Field 6 : Minimum response time (e.g. 58)
  • Field 7 : Maximum response time (e.g. 2710)
  • Field 8 : Number or errors (e.g. 1127)
  • Field 9 : Error percentage (e.g. 100 Seems my all tests has failed :D )

3 comments:

Comments are highly appreciated... :-)