pytest - Zephyr scale 服务器:通过自动化 API 将测试结果上传到 Zephyr Scale
问题描述
我正在使用 Zepyhr Scale Server,我想将使用 pytest 制作的自动化测试套件的结果上传到 Zephyr。我试过这个 POST 请求:
post(url="https://{my-jira-host}/rest/atm/1.0/automation/execution/{projectKey}", auth=({my_username}, {my_password}), files={"file":open("test_results.zip","rb")})
但它不起作用,因为响应是“errorMessages”:[“无效的自定义格式 JSON 文件”]}。
我正在上传一个 zip 文件,其中包含一个使用生成的 xml 文件
pytest --junitxml=output/junitxml_report.xml 在这里解释https://support.smartbear.com/zephyr-scale-cloud/docs/test-automation/pytest-integration.html
我尝试使用 API 客户端(邮递员)发出相同的请求,但错误是“无效的 ZIP 文件”,即使我使用错误的用户名未能通过身份验证,或者即使我只上传了 xml 文件。
也许有人会做同样的事情并可以帮助我?我是新手:) 谢谢!
解决方案
推荐阅读
- visual-studio - Task Runner Explorer 在 Visual Studio 2019 中找不到 webpack.config.js
- python - 有没有一种有效的方法在数据框中传输数据?
- excel - 测试选定范围内某些单元格中的图片
- json - 如何连接 json 文件和后效来渲染动态视频
- jquery - 如何为搜索数据表jquery设置列
- github - 如何使用 GitHub 存储库中的 used by 按钮
- javascript - 不将 initializeApp 用于带有 webpack 的 firebase
- flutter - Flutter:从 Firestore 获取特定数据并以文本形式输出
- python - matplotlib条形图没有出现
- c# - 在 linq 中使用自定义方法时,另一个选项是在 linq EF 中使用 AsEnumerable()