综合空手道测试报告和持续测试 [英] Aggregated Karate test Report and Continuous Testing

查看:30
本文介绍了综合空手道测试报告和持续测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在使用空手道运行测试用例后,一些 html 报告会通过surefire 插件发布.特别是,我发现每个功能文件都有一个 html 报告.当从自动化管道运行测试时,这很不方便,比如在我的例子中,我使用 htmlpublish Jenkins 插件来获取公共链接来访问报告并将它们传播到松弛的渠道或电子邮件中.

After running a test case with Karate, some html reports are published with surefire plugin. In particular, I've found that there is an html report for each feature file. 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.

我试图在我的 pom.xml 中添加这个片段

I've tried to add this snippet in my 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.

我正在尝试在 target/surefire-reports 目录中创建一个 index.html,以便我可以发布和浏览所有测试报告

I'm trying to achieve a single index.html into the target/surefire-reports directory so i can publish and browse all test reports

有什么建议吗?谢谢

推荐答案

你用的是parallel runner 吗?如果没有,请阅读:https://github.com/intuit/karate#parallel-执行

Are you using the parallel runner ? If not, please read up about it: https://github.com/intuit/karate#parallel-execution

由于除了行业标准的 JUnit XML 格式之外,我们还会发出与黄瓜兼容的 JSON 报告,因此您可以选择适合您需求的任何报告解决方案.我认为 maven-cucumber-reporting 库应该适合您 - 但您可以决定:https://github.com/intuit/karate/tree/master/karate-demo#example-report

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. 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

对于任何其他高级需求,请考虑编写您自己的报告:https://stackoverflow.com/a/66773839/143475

For any other advanced needs, please consider writing your own report: https://stackoverflow.com/a/66773839/143475

这篇关于综合空手道测试报告和持续测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆