Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 32 Next »

Compatibility with Sonar





Quick guide

  • Install plugin in SONAR (copy to extensions/plugins/) and restart SONAR server.

New feature in plugin version 0.2
There is now a jmeter-report-server embedded inside the sonar plugin, and there is a new configuration option (Local jtl file) where you can set a jtl file path, local to the sonar server. If this option is set, no remote jmeter report server if used, and jmeter test results are taken from the local file.

If you want to use JMeter Report Server then:

  • Download jmeter-report-server-0.1-jar-with-dependencies.jar
  • Run server where your JMeter instance is running:
  • Go to your system settings in SONAR and set host and port for your JMeter Report Server.
  • Go to your project settings and set the "configuration key" (this must be the same you set in your property name).
  • Run mvn sonar:sonar
  • Add JMeter widget to your dashboard and your JMeter metrics will be shown (smile)

JTL files must be provided as a result of JMeter tests.
JMeter Report Server is just to make JTL files available remotely.

Description / Features

This plugin collects performance tests results from Apache JMeter. Apache JMeter may be used to test performance both on static and dynamic resources (files, Servlets, Perl scripts, Java Objects, Data Bases and Queries, FTP Servers and more). It can be used to simulate a heavy load on a server, network or object to test its strength or to analyze overall performance under different load types. You can use it to test your server/script/object behavior under heavy concurrent load.

If it is the first time you hear from Apache JMeter then you should try it before using this plugin.

The following metrics are included in Sonar:

  • Duration (in seconds)
  • Error density (number of errors / number of requests * 100)
  • Average response time for requests
  • Average response time for transactions
  • Successful requests per minute
  • Successful requests per minute and user
  • Response time deviation for requests
  • Response time deviation for transactions
  • Number of requests
  • Number of transactions
  • Successful transactions per minute
  • Successful transactions per minute and user

This is an example of the widget you will see in Sonar:

Usage & Installation


JMeter installation is very easy. JMeter is developed with Java and it is distributed as a compressed file.

You can download it from and then run the provided script (bin/jmeter).

Recording a test in JMeter

You can find a step by step tutorial in JMeter's website:

It describes how to record a test plan using the JMeter proxy.

You can also take a look at this video tutorial to see how to record a test with JMeter:

SONAR JMeter plugin uses the results datafile generated by JMeter (file with extension .JTL) so remember to configure your test plan to store the results in a single JTL file.

In this video we show you how to set this JTL file:

JMeter Report Server

JMeter Report Server is a server that generates performance reports from JMeter results. SONAR JMeter Plugin uses this server to get the performance metrics from the projects.

It must be installed on the same machine with JMeter tool. The server will read the JTL files to get provide all the data to SONAR.

JTL files must be provided as a result of JMeter tests. JMeter Report Server is just to make JTL files available remotely.

JMeter Report Server Configuration

JMeter Report Server needs to know where the JTL files are located. You can set your test configuration when running the server through command line system properties:

where name is the test configuration that you will use in SONAR JMeter Plugin project settings.

Or you can also set this location by creating a property file "" with all your test configurations:

This is useful is you have multiple projects in your JMeter environment and you want to manage all your tests with a single JMeter Report Server.

Port and maxConnections are now configurable properties and they can be set as system properties (using -D in the start command) or as normal properties in the file as shown below.

Here you have a test configuration example:

This configuration will set JTL file "/home/carlos/jmeter_work/iceweb.jtl" to the project "iceweb".

"iceweb" will be the name for your test configuration. SONAR plugin settings will use that name.

JMeter Report Server Installation

Server is package in a single jar with all dependencies, so just download JMeter Report Server and put it wherever you want (smile)

Running JMeter Report Server

You can start the server with this command:

NOTE: replace "jmeter-report-server.jar" with the name of the file downloaded and testconfig property with your project name and the path to the JTL file.

SONAR JMeter Plugin


  1. Copy the jar into /extensions/plugins/ directory
  2. Restart Sonar server


This video shows how to configure JMeter plugin in SONAR:

  • Project must exist in SONAR before using JMeter plugin
  • JMeter Report Server must be up and running (local or remote) and it must have a test configuration with the same name you set in SONAR JMeter plugin settings.
  • JTL file must exist in the host that is running JMeter Report Server.

Add JMeter widget to your dashboard and next time you run "mvn sonar:sonar" you will retrieve performance metrics from JMeter and SONAR will show them.

Known limitations

  • Server port is always 4444. This will be improved in next release so that you can set the port in your server properties.



Release 0.1 (5 issues)

  • No labels