在Linux版Postman中生成测试报告,可以使用newman
命令行工具。以下是详细的步骤:
npm install -g newman
newman run your-collection.json -r html --reporter-html-export all --output ./report
your-collection.json
:你的测试集合文件。-r html
:指定使用HTML报告格式。--reporter-html-export all
:导出所有测试结果。--output ./report
:指定输出报告的目录。newman run collection.json -r htmlextra --reporter-htmlextra-noSyntaxHighlighting
newman run collection.json -r htmlextra --reporter-htmlextra-browserTitle "自定义测试报告标题"
newman run collection.json -r htmlextra --reporter-htmlextra-title "自定义自动化测试报告"
以上步骤可以帮助你在Linux系统上使用Postman生成测试报告,并且可以根据需要自定义报告的显示效果。