I use JMeter a lot for creating functional tests. These (unit)tests mostly exists of testing REST APIs against a running application. Why? There must be some other tool for it, right? I know, however I simply know how to use it, so I had it up and running quickly.

However I came across an issue that I've wanted the result of the JMeter test to be included in the CI testresult. Most of the CI tools I know (read: Jenkins and Bamboo) can read JUnit XML result.

So I came across this fantastic library that converts the JMeter output format (JTL) to JUnit output format.

I use it like this:

# > jmeter -n -t /path/to/jmeter-script.jmx
# > java -jar /usr/lib/m2u.jar --input jmeter-jtl-result.xml --output jmeter-junit-result.xml

In the script you only need to provide a Result Summary that exports to JMeter JTL (XML output).

As always the real catch is in the end. There is a bug in the m2u lib and I have provided a fix here.