生成html的报告:
1, cucumber user_register/ --format html --out=/var/www/features_report.html
2, 在浏览器中输入 http://127.0.0.1/features_report.html 查看报告。
3, 别人要浏览器中输入 http://10.0.2.99/features_report.html ==>10.0.2.99是我运行测试程序的测试机,也就是测试报告会存放在10.0.2.99的/var/www/目录下。
4, 配置config/cucumber.yml 文件, 这个文件放在support目录下。
输入:
drhel31_cucumber_report: --format progress --format html --out=/var/www/drhel31_cucumber_report.html
drhel21_cucumber_report: --format progress --format html --out=/var/www/drhel21_cucumber_report.html
5, cucumber user_register/ -p drhel31_cucumber_report 运行时会先识别cucumber里的yml配置。
这个report 在哪台机子运行就会生成在哪台机子上的 /var/www/目录下,且名为drhel31_cucumber_report.html
以上就是cucumber生成html的报告实现步骤的详细内容,更多请关注php中文网其它相关文章!
HTML怎么学习?HTML怎么入门?HTML在哪学?HTML怎么学才快?不用担心,这里为大家提供了HTML速学教程(入门课程),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号