allure
安装allure
在github上下载allure包,解压
allure下载地址
配置环境变量
验证allure --version
安装newman-reporter-allure
npm install -g newman-reporter-allure
allure测试报告的生成
- newman run的时候添加参数
-r allure --reporter-allure-export [文件保存路径]
newman run postman_collection.json -e postman_environment.json -r allure --reporter-allure-export allure_report
会生成allure_report文件夹,里面保存的全是json和txt格式的文件
- 生成测试报告
allure generate [原文件] -o [目的文件] --clean 生成allure测试报告
allure generate allure_report -o allure_html--clean
生成allure_html文件夹,里面为生成的测试报告
newman allure-report中文乱码问题处理
生成的测试报告有乱码情况
找到newman-reporter-allure路径,找到index.js文件,注释最后几行即可