黄瓜重新运行失败测试java jenkins

时间:2018-05-29 16:11:37

标签: cucumber cucumber-jvm cucumber-java maven-failsafe-plugin

如何在使用maven-failsafe-plugin重新运行失败测试之前清理黄瓜report.json?

我使用jenkins + maven + cucumber-jvm-parallel-plugin + maven-failsafe-plugin。 如果使用maven-failsafe-plugin重试:

<rerunFailingTestsCount>${rerunFailingTestsCount}</rerunFailingTestsCount>

效果很好,但是在rerunFailingTestsCount&gt;的情况下0生成的report.json(1.json,2.json,3.json)为空,因为重新运行黄瓜测试只清除没有人口的报告。

空黄瓜报告(report.json)是Cucumber Reports Plugin [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]

0 个答案:

没有答案