黄瓜报告生成无效。请提供给我jenkins管道和Cucumber运行程序代码部分

问题描述 投票:0回答:1

我想将空手道与之融合。我使用詹金斯管道。请向我提供黄瓜选项,这些选项可以帮助我生成黄瓜报告。这是我在Jenkins管道中生成Cucumber报告的步骤。

                       steps {
                           fileIncludePattern: "**/cucumber.json",
                           jsonReportDirectory: "target"
                       }
                   }
@RunWith(Cucumber.class)
@CucumberOptions(format = {"pretty", "html:target/cucumber", "json:target/cucumber.json"})

我在詹金斯中看到此错误消息

[CucumberReport] Using Cucumber Reports version 5.0.2
[CucumberReport] JSON report directory is "target"
[CucumberReport] Copied 0 json files from workspace "C:\workspace\workspace\MS_Tests\Accounts_Service_Tests\target" to reports directory "C:\Jenkins\jobs\MS_Tests\jobs\Accounts_Service_Tests\builds\43\cucumber-html-reports\.cache"
[CucumberReport] Copied 0 properties files from workspace "C:\workspace\workspace\MS_Tests\Accounts_Service_Tests\target" to reports directory "C:\Jenkins\jobs\MS_Tests\jobs\Accounts_Service_Tests\builds\43\cucumber-html-reports\.cache"
[CucumberReport] Processing 0 json files:
[CucumberReport] Missing report result - report was not successfully completed
[CucumberReport] Build status is changed to UNSTABLE
cucumber reporting karate
1个回答
0
投票

空手道不再支持Cucumber注释,甚至不再支持format选项。我认为您需要阅读文档并正确理解这一点。

链接:https://github.com/intuit/karate#parallel-execution

因此,您将获得“黄瓜JSON”。一旦有了这些,将其添加到Jenkins是一件标准的事情。

© www.soinside.com 2019 - 2024. All rights reserved.