与詹金斯(Jenkins)在JMeter中重新断言-从未表现出失败 [英] Respoinse Assertions in JMeter with Jenkins - never showing a failure

查看:365
本文介绍了与詹金斯(Jenkins)在JMeter中重新断言-从未表现出失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

寻找一些指导.

我有一个基本的JMeter测试计划设置来加载页面.我添加了一些断言来检查屏幕上的文本是否显示(用于这些响应断言.)我使用JMeter GUI运行该计划,并故意导致断言失败-错误率达15%-因此很好.

I have a basic JMeter test plan setup to load a page. I've added a couple of assertions in to check that text on screen is displayed (used response assertions for these.) I ran the plan using the JMeter GUI and deliberately caused the assertion to fail - there was a 15% error rate - so this was good.

然后,我尝试使用Performance Plugin在Jenkins中运行相同的计划(并已更新到最新版本),但是测试始终返回通过状态.我已经确认(通过控制台输出)仍然看到15%的错误.

I then tried to run the same plan in Jenkins using the Performance Plugin (and have updated to the latest version) however the test always returns as passed. I have confirmed (via the console output) that the 15% error has still been seen.

该作业当前配置的失败百分比范围为0.0到0.0,并且失败"和不稳定"的在单个版本上使用错误阈值:"设置为0.

The job is currently configured with a failed % range of 0.0 to 0.0 and "Use Error thresholds on single build: " is set to 0 for failed and for unstable.

我认为我在这里缺少什么-jmeter/jenkins专家是否可以给我一些指导?

I think I am missing something here - are any jmeter/jenkins experts able to give me a few pointers?

推荐答案

Jenkins配置:

  1. 添加一个新报告,为您的报告(JMeter,JUnit)选择合适的解析器
  2. 配置搜索模式以选择Performance插件要解析的文件.如果您将输入框留空,则取决于解析器,将使用默认模式.
  3. 您可以配置错误百分比阈值,这些阈值会使项目不稳定或失败,或者将它们留为空白以禁用该功能.

性能插件的使用:

  1. 配置了Jenkins并启动了第一个构建后,您会注意到左侧的摘要中出现了一个新条目:性能趋势.

  1. As soon as you have configured Jenkins and launched a first build, you'll notice that a new entry is appearing in the left summary : Performance trend.

如果只有一个报告文件,则这些报告的图形将显示在主页上.

If you just have one report file, the graph of this reports will appear on the main page.

如果您有一个以上的报告文件,则必须单击性能趋势",然后图形就会出现

If you have more of one report file, you must click on "Performance Trend" and the graphs will appear

尝试以下链接:

  1. https://wiki.jenkins-ci.org/display/JENKINS /Performance + Plugin
  2. https://www.blazemeter.com /blog/continuous-integration-101-how-run-jmeter-jenkins
  1. https://wiki.jenkins-ci.org/display/JENKINS/Performance+Plugin
  2. https://www.blazemeter.com/blog/continuous-integration-101-how-run-jmeter-jenkins

这篇关于与詹金斯(Jenkins)在JMeter中重新断言-从未表现出失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆