在Ubuntu系统下使用Postman导出报告的步骤如下:
newman-reporter-htmlextra
依赖包:npm install newman-reporter-htmlextra --save-dev
。package.json
文件中的测试脚本,用于运行测试用例并输出HTML测试报告:"test": "newman run Testcase/demo.postman_collection.json -e Env/DemoEnv.postman_environment.json -r htmlextra --reporter-htmlextra-export ./Report/Postman-newman-demo-api-testing-report.html"
npm run test
。通过以上步骤,您可以在Ubuntu系统下使用Postman轻松导出请求、集合、环境变量和测试结果,以便进行共享、备份或进一步分析。