4

Is it possible to have a Maven/Jenkins build fail due to JMeter tests failing to achieve a specified throughput?

I'm tinkering with the jmeter-maven-plugin in order to do some basic performance tests as part of a continuous integration process in Jenkins.

One can set a Duration Assertion on a Sampler in the JMeter test to mark the sample as failed if a response time is over a certain threshold. What I'd like is to be able to fail a build (in Maven, or in the Jenkins job that triggers the Maven build) based on the total throughput for a test.

Is this possible with any existing plugins?

4

1 回答 1

3

是的,有可能。您可以使用Jenkins Text Finder 插件和 JMeter “聚合报告”。使用汇总报告,您可以编写 CSV 或 XML 文件。您可以使用 Jenkins Text Finder 插件在此文件中搜索您的吞吐量,然后您可以将构建标记为失败或不稳定。或者,您可以使用 BASH 脚本搜索生成的 JMeter 报告文件并返回非空返回值。这将使您的构建失败。

于 2013-10-09T20:16:56.653 回答