Jmeter - Getting previous results in mail

血红的双手。 提交于 2020-01-30 12:52:10

问题


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).

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.

any help would be appreciated.

EDIT: This is the SMTP sampler settings:

and this is the writing to the file:


回答1:


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.

So :

1/ ensure you move or delete the file once sent

2/ Edit user.properties and add:

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



来源:https://stackoverflow.com/questions/32352502/jmeter-getting-previous-results-in-mail

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!