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

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

问题描述

在用空手道运行测试用例后,一些带有surefire插件的html报告会发布.特别是,我发现每个功能文件都有一个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>

但效果不理想.

我正在尝试在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

有什么建议吗? 谢谢

推荐答案

您是否正在使用并行运行器?如果没有,请阅读以下内容: 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

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

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