Skip to main content

Posts

Showing posts with the label maven

Maven pom.xml configuration file to execute Jmeter tests and generate HTML reports

Example of a Maven pom.xml file for execution of Jmeter tests that will automatically generate HTML reports and historical trends with pretty graphs with the help of a Chronos plugin. - Install Maven and make sure it works - Create some testmyapp.jmx Jmeter script and put it into ${basedir}/tests/ directory - Unpack the latest version of Jmeter into jmeter.home directory - And finally you execute the following commands ( -Dbuild.number parameter can be your build number and you can set it dynamically in your continuous integration system, this is just for convenience and even greater coolness of the script): Enjoy amazing HTML reports generated by Chronos!

How to measure the peak number of parallel users with JMeter

How to measure the peak (maximum) number of parallel users supported by your web application? It seems to be a trivial task for JMeter, however it is not so simple. The main problem is that JMeter doesn't have a built-in feature to identify how Response Time changes with amount of parallel threads. But what if we need to measure this metric in scope of performance testing? There is a nice Response Times vs Threads plugin for JMeter. However this plugin works only with the version of JMeter starting from 2.4 and it is hard to integrate it with Continuous Integration servers. And what if we have the bunch of scripts already implemented for the older 2.3.4 version or just looking for alternative solution that is easier to integrate with our Continuous Integration server? Chronos plugin for Maven would be a good match. Integration of Maven and Chronos with JMeter had been already described in this post This what I suggest to change in your JMeter script: In "Thread group&q

Jmeter and Maven Chronos plugin

There are several different approaches to integrate JMeter and Maven. We needed to use one of them to integrate our JMeter test automation suite with our continuous integration server. There are two plugins available: JMeter Maven Plugin Chronos Maven Plugin I decided to use Chronos Maven plugin. It requires explicit installation of JMeter. I've successfully configured pom.xml for running our test automation suite and reporting of the test results. You need to perform the following steps: 1. Install Apache Maven 2. Create pom.xml file and put it in a directory of your choice 3. Set your local JMeter installation directory path in jmeter.home in pom.xml file 4. Set the path to your JMeter script in pom.xml 5. Set assertions in pom.xml file if required (I didn't need this, so they are not present in the example below) 6. Create a JMeter project and copy it to test subdirectory of the directory where you stored pom.xml file. Your directory structure should