Saturday 30 September 2017

Automate JMeter Reporting

The below post will explain how to automate the reporting part in JMeter.

Since, we all know that it is quite challenging to create graphs in jmeter after the load test execution. Also, the summary report that JMeter provides us contains response time of PASSED as well as FAILED transactions. (we require response time for the PASSED transactions only)
Moreover, we also want to get the result data for steady state duration along with full duration.

I have created a script in JMeter that will take care of all the above points.You need to provide the .JTL or .CSV path and my script will do the rest.

Prerequisite(One time work)


You have to install the following plugins
  • https://jmeter-plugins.org/?search=jpgc-synthesis
  • https://jmeter-plugins.org/?search=jpgc-filterresults
  • https://jmeter-plugins.org/?search=jpgc-cmd
  • https://jmeter-plugins.org/?search=jpgc-graphs-basic
  • https://jmeter-plugins.org/?search=jpgc-graphs-additional




Some basic things to consider


  • Make sure there is no space in JMeter path. The path(C:\Users\user\Downloads\apache-jmeter-3.0\apache-jmeter-3.0\bin) is a valid path
  • The working directory for this script is "jmeter\lib" and not "jmeter\bin". Hence, the result directory will be created into "jmeter\lib\"


Script Location


Please use the below link to download the script


Steps to execute


  • Double Click on bin/Jmeter.bat.
  • Open the script in jmeter.
  • Enter the result file path in "Config Settings".
  • Enter time in seconds for steady state (Start offset and End offset)
  • Click on the green button to execute the script.
  • The result file will be created in jmeter\lib

Since, I have used "tearDown Thread Group" to create this script, you can also combine this script with your test script and enter the same JTL file path in both test script summary report and result creation config settings. 


Next, click on the Test Plan and tick " Run tearDown Thread Groups after shutdown of main threads".In this way, the "tearDown Thread Group" will be executed after your load test completion and you will have the results ready in Jmeter\lib directory.

Result file

  • The Result file will be created in the Jmeter/lib directory. The name format for the result file would be Result_currentdateTime. e.g 'Results_01_043_201794309'
  • The result file contains result data for both Overall and steady state duration. Please go through the below screenshots

  



If you have any issues in downloading/accessing the script link, please email me at rahul225sharma@gmail.com. Would be happy to send you. :)

No comments:

Post a Comment