Introduction:
Sonar is an opensource quality management platform, dedicated to continuously analyze and measure technical quality, from project portfolio to method. It comes with various plugin. Here I am going to show how you can use Sonar Jmeter plugin, to get Jmeter report on Sonar Dashboard.
Once you are done with Sonar-Jmeter plugin configuration, you will be able to see Performance Result as shown below figure on Sonar Dashboard.
Before we start Sonar-Jmeter Configuration, first we need to setup Jmeter Report server. Jmeter Resport server will serve report of Jmeter load test for the requested Project. Once Jmeter Report server configuration is done, we can do the Sonar-Jmeter plugin configuration.
Jmeter Report Server Configuration:
(1) First you need to download Jmeter Report Server from below URL.
http://snapshots.repository.codehaus.org/org/codehaus/sonar-plugins/jme…
(2) Extract jmeter-report-server-0.3-SNAPSHOT-dist.zip at some location.
(3) Open jmeter-report-server-0.3-SNAPSHOT/properties/jmeter-report-server.properties file and add configuration related to project.
testconfig.Iceweb.desc=Iceweb
testconfig.Iceweb.jtlpath=/opt/jmeter-report-server-0.3-SNAPSHOT/reports/Iceweb.jtl
Here "testconfig.Iceweb.desc" is the name of Project. and "testconfig.Iceweb.jtlpath" is the path of Jmeter report file. Which comes in .jtl format. Please note the Project name marked in Yellow background. This is the projectname, which will be used in Sonar-Jmeter plugin configuration.
(4) Once you are done with changes in jmeter-report-server.properties file, then start Jmeter Report server using below command.
nohup sh jmeter-report-server.sh &
Above command will start Jmeter Report server in background on port number 5555.
Sonar Jmeter Plugin Configuration:
(1) Install Jmeter plugin from Sonar Dashboard.
(2) Select Project in which you want to show output of Jmeter Load test result. Go to Settings -> Jmeter.
(3) Add below configuration and click on "Save Jmeter Settings" button.
Remote config name=Iceweb
Remote server host=<IP address of Jmeter Report Server>
Remote server port=5555
(4) Now when next build will run, Sonar-Jmeter will show out of Jmeter Result file as shown in Above Figure.