我正在尝试使用 Newman for CI 将我的 Postman 集合与 Azure 管道集成并生成测试结果,我能够在 Azure Pipeline 中运行测试但无法发布结果。
以下是我遵循的步骤-
1.从 Postman 导入 postman collection.Json 和 environment.Json 到我的仓库中。
2.新建管道
3.新增代理
4.新增安装Newman任务
5.添加了第二个任务来运行我的测试
脚本-
newman run Staging_Tests.postman_collection.json -e staging.postman_environment.json --reporters cli,junit,htmlextra --reporter-junit-export Results\junitReport.xml --reporter-htmlextra-export Results\junitReport.html< /p>
预期 - 根据脚本,它应该在工作目录中提供的文件夹中创建一个名为 Results 的目录,并且应该创建 junitReport.xml strong> 结果文件夹内的结果文件。
实际- 它正在执行我的测试,但未在工作目录路径中创建文件夹,我无法继续发布测试结果。
我在这里遗漏了什么吗?任何帮助将不胜感激。