Jmeter - 在邮件中获取以前的结果 [英] Jmeter - Getting previous results in mail

查看:28
本文介绍了Jmeter - 在邮件中获取以前的结果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Jmeter - 它每 4 小时自动运行一次(通过 crontab).我在测试结束时通过邮件发送结果文件 (csv).我总是看到上一个测试的文件,而不是当前的(我可以按小时查看).

I'm using Jmeter - it runs automatically every 4 hours (through crontab). I'm sending the results file (csv) in the mail at the end of the test. I always see the file of the previous test, not the current one (I can see by the hour).

结构是这样的:一个测试计划"(我检查连续运行线程组"主线程关闭后运行tearDown线程组"),两个线程组" - 在每个末尾我使用查看结果树"将结果写入 csv 文件,最后 - 使用 SMTP 采样器发送创建的文件的拆卸线程组".

the structure is this: one 'Test Plan' (I checked 'Run Thread Groups consecutively' and 'Run tearDown Thread Groups after shutdown of main threads), two 'Thread Groups' - which at the end of each I write results to csv file using 'View Results Tree', and at the end - 'TearDown Thread Group' that uses SMTP sampler to send the files created.

任何帮助将不胜感激.

这是 SMTP 采样器设置:

This is the SMTP sampler settings:

这是对文件的写入:

推荐答案

这可能是由于 Autoflush 策略仅在到达缓冲区时才刷新缓冲区的内容.当您使用拆卸线程组结果时,不能保证完全编写,因为测试还没有真正完成.您认为您正在发送以前的测试文件的事实可能是由于 jmeter 将数据附加到同一个结果文件中.

This might be due to Autoflush policy which flushes content of buffer only when buffer is reached. As you use a tear down thread group results are nit guaranteed to be fully written as test is not really finished. The fact that you think you are sending previous test file might be due to jmeter appending data to the same results file.

所以:

1/确保您在发送后移动或删除文件

1/ ensure you move or delete the file once sent

2/编辑 user.properties 并添加:

2/ Edit user.properties and add:

jmeter.save.saveservice.autoflush=true这将使 jmeter 在执行后立即将任何示例结果写入文件.

jmeter.save.saveservice.autoflush=true This will make jmeter write to file any sample result immediately afte it is executed.

这篇关于Jmeter - 在邮件中获取以前的结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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