简体   繁体   English

综合空手道测试报告和持续测试

[英]Aggregated Karate test Report and Continuous Testing

After running a test case with Karate, some html reports are published with surefire plugin.使用空手道运行测试用例后,一些 html 报告会使用 surefire 插件发布。 In particular, I've found that there is an html report for each feature file.特别是,我发现每个功能文件都有一个 html 报告。 This is inconvenient when tests are run from an automated pipeline, like in my case, where I use htmlpublish Jenkins plugin to get a public link to access reports and spread them across slack channels or emails.当测试从自动化管道运行时,这很不方便,比如在我的情况下,我使用 htmlpublish Jenkins 插件来获取公共链接来访问报告并将它们传播到松弛的渠道或电子邮件中。

I've tried to add this snippet in my pom.xml我试图在我的 pom.xml 中添加这个片段

      <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-report-plugin</artifactId>
            <version>2.4.2</version>
            <configuration>
                <aggregate>true</aggregate>
                <!--also set this to link to generated source reports-->
                <linkXRef>true</linkXRef>
            </configuration>
        </plugin>

But it had not the desired effect.但并没有达到预期的效果。

I'm trying to achieve a single index.html into the target/surefire-reports directory so i can publish and browse all test reports我正在尝试在 target/surefire-reports 目录中实现单个 index.html,以便我可以发布和浏览所有测试报告

Any suggestion?有什么建议吗? Thanks谢谢

Are you using the parallel runner ?你用的是平行赛跑吗? If not, please read up about it: https://github.com/intuit/karate#parallel-execution如果没有,请阅读它: https : //github.com/intuit/karate#parallel-execution

Since we emit the cucumber-compatible JSON report in addition to the industry-standard JUnit XML format, you have the choice of any reporting solution that fits your needs.由于除了行业标准的 JUnit XML 格式之外,我们还发布与黄瓜兼容的 JSON 报告,因此您可以选择适合您需求的任何报告解决方案。 I think the maven-cucumber-reporting library should work for you - but you can decide: https://github.com/intuit/karate/tree/master/karate-demo#example-report我认为 maven-cucumber-reporting 库应该适合你 - 但你可以决定: https : //github.com/intuit/karate/tree/master/karate-demo#example-report

EDIT: For any other advanced needs, please consider writing your own report: https://stackoverflow.com/a/66773839/143475编辑:对于任何其他高级需求,请考虑编写您自己的报告: https : //stackoverflow.com/a/66773839/143475

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM