如何在jmeter中通过电子邮件发送更新的测试结果 [英] How to email the updated test result in jmeter

查看:137
本文介绍了如何在jmeter中通过电子邮件发送更新的测试结果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在测试计划中有一个简单的HTTP Request采样器.并且,通过汇总报告"查看结果并将相同结果写入文件.我在"tearDown线程组"中使用了"SMTP采样器",并且还使用了测试操作"来等待一段时间. 问题是,执行测试用例后,在邮件中得到的是先前的运行结果,而不是新的运行结果.

I have a simple HTTP Request sampler in a test plan. And, viewing the result through "Aggregate Report" and writing the same results to a file. I have used "SMTP Sampler" in "tearDown Thread Group" and also used the "Test Action" to wait for a while. Issue is, once I execute the test-case, in mail I got the previous run results instead of the new one.

这是我的测试计划的屏幕截图.

Here is the screen-shot of my test plan.

请帮助.预先感谢!

推荐答案

我不喜欢您的测试操作要等待一段时间"的方法,因为它可能还不够,因此您无法确定JMeter是否存储了最新结果.

I don't like your "Test Action to wait for a while" approach as it may be not enough so you won't be able to tell for sure whether JMeter stored the most recent results or not.

我建议以下内容:将jmeter.save.saveservice.autoflush=true行添加到 user.properties 文件(位于JMeter安装目录的/bin文件夹下),在下一个JMeter启动时,它将存储每一行.

I would suggest the following: add jmeter.save.saveservice.autoflush=true line to user.properties file (it's located under /bin folder of your JMeter installation) and on next JMeter start it will be storing every single line.

所以

  1. 应用上述属性更改
  2. 配置SMTP采样器以发送results.jtl文件
  3. 禁用所有侦听器.
  4. 在命令行非GUI模式下运行JMeter 如下

  1. Apply aforementioned property change
  2. Configure your SMTP Sampler to send results.jtl file
  3. Disable all the listeners.
  4. Run JMeter in command-line non-GUI mode as follows

jmeter -n -t /path/to/your/testplan.jmx -l /path/to/results.jtl

  • 作为编辑 user.properties 文件的替代方法,您可以通过-J命令行参数传递属性,例如:

  • As an alternative to editing user.properties file you can pass the property via -J command line argument like:

    jmeter -Jjmeter.save.saveservice.autoflush=true -n -t /path/to/your/testplan.jmx -l /path/to/results.jtl
    

  • 有关JMeter属性和方式的更多信息,请参见 Apache JMeter属性自定义指南.与他们合作.

    See Apache JMeter Properties Customization Guide for more information on JMeter properties and ways of working with them.

    这篇关于如何在jmeter中通过电子邮件发送更新的测试结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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