如何仅在jmeter中记录错误响应 [英] How to log only error responses in jmeter

查看:347
本文介绍了如何仅在jmeter中记录错误响应的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在jmeter上设置了以下参数,我在一个循环中运行脚本,该循环正在创建巨大的日志(jtl文件),我只能记录错误响应吗?

I have the following params setup on jmeter, I am running my script in a loop which is creating huge logs(jtl file), Can I log only error responses ?

推荐答案

您可以通过将以下行添加到 user.properties 文件中,将JMeter配置为仅为失败的采样器保存响应数据:

You can configure JMeter to save response data only for failed samplers by adding the next lines to user.properties file:

jmeter.save.saveservice.response_data=false
jmeter.save.saveservice.response_data.on_error=true

如果要完全禁用为成功的采样器保存任何度量标准,则将下一行添加到同一文件中(但是您将无法以这种方式获得可靠的度量标准):

If you want to completely disable saving any metrics for successful samplers add the next line to the same file (however you won't be able to get reliable metrics this way):

jmeter.save.saveservice.successful=false

参考文献:

  • Configuring JMeter
  • Apache JMeter Properties Customization Guide

这篇关于如何仅在jmeter中记录错误响应的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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