Aggregated Karate test Report and Continuous Testi

2019-08-13 14:50发布

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.

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.

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

Any suggestion? Thanks

1条回答
Luminary・发光体
2楼-- · 2019-08-13 14:58

Are you using the parallel runner ? If not, please read up about it: 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. 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

查看更多
登录 后发表回答