Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to display performance test results on Jenkins

Tags:

We've written a framework to test the performance of our Java application (none of the existing frameworks, eg JMeter, were appropriate). The framework produces various metrics, e.g. mean/min/max transactions per second.

We'd like each Jenkins build to display these metrics so that we can keep track of whether a commit has improved performance or not.

I can't figure out how to do this.

One idea is to modify our performance test framework to output a HTML file, then somehow make Jenkins display/link to it on the build results page.

Any advice gratefully received.

like image 523
Phil Harvey Avatar asked Feb 15 '12 08:02

Phil Harvey


2 Answers

The Peformance Plugin can show the results of JMeter and JUnit test in the nice, graphical fashion. And on the plugin page there is a description on how to use it.

This is an open-source plugin hosted on GitHub. The JUnit and JMeter parser are already there, but You can implement your own just by subclassing PerformanceReportParser. It's pretty easy and you can just fork the repo and start your implementation.

like image 133
Łukasz Rżanek Avatar answered Feb 09 '23 14:02

Łukasz Rżanek


I agree that it is hard (if not impossible) to squeeze all the information into standard formats, like JUnit. They are good for quick identification of problems. Once you know there is a problem - you need more information that is usually free-form or custom-formatted to fit your particular needs. So we use both: JUnit that can be immediately processed by Jenkins to decide if the build is stable or not, draw the nice trend graph, etc. We also produce an HTML report that is much more detailed.

Now to your immediate question: you can simply archive your HTML file as an artifact (there is a standard post-build step to do that). Then a link to it will be displayed among the artifacts for the build. There are permalinks to the latest artifacts and latest successful build artifacts:

http://[server]/job/[job_name]/lastCompletedBuild/artifact/foo.html http://[server]/job/[job_name]/lastSuccessfulBuild/artifact/foo.html 

You may bookmark those links and have quick and easy one-click access to your results.

like image 33
malenkiy_scot Avatar answered Feb 09 '23 13:02

malenkiy_scot