cucumber - 黄瓜重新运行失败的测试 java jenkins
问题描述
如何在使用 maven-failsafe-plugin 重新运行失败测试之前清理黄瓜 report.json?
我使用 jenkins + maven + cucumber-jvm-parallel-plugin + maven-failsafe-plugin。如果使用 maven-failsafe-plugin 重试:
<rerunFailingTestsCount>${rerunFailingTestsCount}</rerunFailingTestsCount>
它工作得很好,但如果 rerunFailingTestsCount > 0 生成的 report.json(1.json, 2.json, 3.json) 是空的,因为重新运行黄瓜测试只会清除没有人口的报告。
空的黄瓜报告(report.json)是黄瓜报告插件[ https://wiki.jenkins.io/display/JENKINS/Cucumber+Reports+Plugin]生成报告失败的原因,但以下例外:
net.masterthought.cucumber.ValidationException: File '<real_path>\1.json' is not proper Cucumber report!
at net.masterthought.cucumber.ReportParser.parseForFeature(ReportParser.java:90)
Caused by: com.fasterxml.jackson.databind.exc.MismatchedInputException: No content to map due to end-of-input
at [Source: (InputStreamReader); line: 1, column: 0]
解决方案
推荐阅读
- c# - 如何使用 Swagger 测试 base64 序列化 PDF 的返回
- excel - 从 VBA EXCEL 宏中查找所有打开的 Word 应用程序
- android - 如何使用数据绑定正确地进行事件处理
- c++ - 从 C++ 或 VB 调用时,WMIC 返回未找到文件 - 命令行有效
- codeigniter - 电子邮件主题行以“?utf-8?Q?”开头 在代码点火器项目中
- vert.x - 用于射频通信的 Vertx 自定义服务器/套接字
- ios - 如何为 NSFetchedResultsController 定义具有泛型类型的协议?
- javascript - jquery从对象创建原型
- xcode - 将 Firebase 集成到 XCode
- php - Wordpress 使用高级自定义字段关系返回选定的值