jenkins the definitive guide

(Jeff_L) #1
<execution>
<id>run-jmeter</id>
<phase>integration-test</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<ant antfile="build.xml" target="jmeter" >
</tasks>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
...
</project>

Now, all you need to do is to run the integration tests with the performance profile to get Maven to
run the JMeter test suite. You can do this by invoking the integration-test or verify Maven life
cycle phase:


$ mvn verify -Pperformance

Once you have configured your build script to handle JMeter, you can set up a performance test build
in Jenkins. For this, we will use the Performance Test Jenkins plugin, which understands JMeter logs
and can generate nice statistics and graphs using this data. So go to the Plugin Manager screen on your
Jenkins server and install this plugin (see Figure 6.25, “Preparing a performance test script in JMeter”).
When you have installed the plugin, you will need to restart Jenkins.


Figure 6.25. Preparing a performance test script in JMeter


Once you have the plugin installed, you can set up a performance build job in Jenkins. This build job
will typically be fairly separate from your other builds. In Figure 6.26, “Setting up the performance

Free download pdf