首页 > 解决方案 > how to email html report of Jmeter execution via Jenkins the one which we get using -e -o in command line?

问题描述

I want to integrate Jmeter with Jenkins for Functional and Performance testing. (Hope Jmeter is good for Functional testing and Performance both). Have created a Freestyle project with Necessary plugins, Performance, and Editable Email ones.

I am able to generate reports in Jenkins workspace using:

sh ./jmeter.sh -n -t jmx_path -l /workspace_path/result.csv -e -o /workspace_path/htmlReport

Also, able to attach index.html file in email. But the problem is it's not accessible as css and other related files are not there.

Please help me on this. Let me know if any other info is required from my end.

Thanks in advance.

标签: jenkinsjmeterjenkins-pluginshtml-emailemail-attachments

解决方案


因为index.html仅发送是不够的,您还需要发送contentsbadmin2-1.0.7文件夹,因此您需要发送整个htmlReport文件夹而不是发送 index.html 文件

你可以像这样打包

sh 'zip -r /path/to/htmlReport.zip /workspace_path/htmlReport'

然后将 .zip 文件发送给您选择的收件人

一个更简单的选择是使用Taurus工具 aa 包装器进行 JMeter 测试,它具有在线报告功能,因此您只需要共享链接


推荐阅读