简体   繁体   中英

Maven - Jmeter integration issues

We are currently in process of integrating Maven to Jmeter in one of our project and facing issues with result analysis.

For result analysis, we have included “jmeter-analysis-maven-plugin“ in the project POM.xml to PASS/FAIL the maven build based on the pre-defined throughput threshold condition.

Problem Statement :

The maven build skips the result analysis and build is successful irrespective of the throughput threshold set. (ie the maven build is successful even when the throughput is not met) .

Has anyone worked on Jmeter-maven integration or have faced similar issues, please let me know.

Below are the versions which we used for integration.

Maven - 3.3.3 Jmeter - 3.2 jmeter- maven-plugin – 2.7.0 jmeter-analysis-maven-plugin – 1.0.6

Also is there any plugin available for build PASS/FAIL based on the response times?

Appreciate quick response.

Thanks in Advance.

It might be the case that your configuration is not compatible with what jmeter-analysis-maven-plugin expects and I'm afraid no one will be able to help unless you provide your pom.xml file and .jtl results file (at least partial).

As alternatives you can consider the following options:

  1. JMeter Maven Plugin has jmeter-check-results goal, so you can mark Maven build as failed if there are sample result failures:

     <execution> <id>jmeter-check-results</id> <goals> <goal>results</goal> </goals> </execution> 
  2. If you have Jenkins somewhere in your intranet you can consider adding your test under continuous integration pipeline so you will be able to use Performance Plugin which can mark the build as failed basing on various thresholds

  3. And last but not least, you can kick off your test via Taurus tool which naturally supports JMeter tests and has powerful Pass/Fail Criteria subsystem so you will be able to run JMeter test using Maven Exec Plugin and Taurus will return a non-zero exit code in case of pass criteria not met causing build failure.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM