Karate: [feature request] Extent Reporting Framework integration

Created on 11 Dec 2018  路  16Comments  路  Source: intuit/karate

Hello Karate team, devs,

We have had great success with your framework, thank you for your work in creating it.

Our team uses Extent Framework, mainly it's Klov server to log reports. The UI is very nice and detailed allowing our team to see run information in real time from anywhere. We also use these reports for our daily stand-ups and release meetings.

We had a small request for you. Please integrate these reports in your framework. They are open source and already have a few adapters available now. It would be nice to have Karate integration as well. It will help our team be in the same realm as far as outputs are concerned, and a known system is generally preferable too.

enhancement help wanted

Most helpful comment

Hi everyone,

These reports look like a lot Allure-generated ones (http://allure.qatools.ru/) which we have successfully integrated with Karate. It was very easy to integrate them into our Jenkins and populate the results straight from the Pipelines.

Just my 2 cents there might be other tools available and easily plug-able.

All 16 comments

@roundcent thanks ! I'm tagging this ticket as help wanted.

IMO this integration should be driven from the extent framework side - and Karate exports both the JUnit XML and Cucumber JSON from the parallel runner - maybe nothing needs to be done !

to re-phrase - this is not a priority for us - but we'll be happy to accept a PR against this ticket.

@ptrthomas

I was looking at the docs and had a question. Are there any hooks/listeners we can subscribe to which give us a picture of the run session? Similar to TestNg IReporter? I feel that is the easiest way to integrate Extent.

I see the existing reports, but unable to find how existing libraries can be integrated.

@roundcent 2 options, karate has a hooks mechanism: https://github.com/intuit/karate#hooks

else we may need to enhance this interceptor to add an afterScenario perhaps: https://github.com/intuit/karate/blob/master/karate-core/src/test/java/com/intuit/karate/core/MandatoryTagHook.java

EDIT: note that now we have an ExecutionHook, please see details here: https://github.com/intuit/karate/issues/970#issuecomment-557443551

@roundcent - but wait maybe the easiest thing to do is unpack the Results class yourself. it has ALL info, so best starting point is this: https://github.com/intuit/karate/blob/master/karate-junit5/src/main/java/com/intuit/karate/junit5/Karate.java

Thank you @ptrthomas, you're awesome.

The 2nd link looks excellent for our purpose. Hopefully @anshooarora takes a look and recommends the best course of action. I will share this link, thank you again.

Hi everyone,

These reports look like a lot Allure-generated ones (http://allure.qatools.ru/) which we have successfully integrated with Karate. It was very easy to integrate them into our Jenkins and populate the results straight from the Pipelines.

Just my 2 cents there might be other tools available and easily plug-able.

Thank you @neillfontes

They are similar, but we are looking mainly for the Klov server which is part of the framework.

http://klov.herokuapp.com

The 2nd link @ptrthomas shared for the Iterator implementation seems extremely straight-forward. I shared it with the Extent's owner and he also shared the same opinion. I am creating a small project which can be used to test the output.

*Edit
forgot to mention, allure uses an adapter implementation but extent is more of a logger style.

@ptrthomas

This can be closed. The integration will happen from Extent side. Thank you again.

@roundcent thanks - even if closed, anyone can reference this in PR-s or future questions. thanks for starting the thread !

@roundcent are u able to help me with sharing any article or tutorial for implementation of Extent Report with Karate Framework. Any help would be of great help.

@ksanchit2015

You can follow the thread below:

https://github.com/extent-framework/extentreports-java/issues/13

I am yet to create an example, but hoping to do it right after the holidays. If you have an example ready with a Karate demo, do share with them :)

Just my 2 cents there might be other tools available and easily plug-able.

Hi everyone,

These reports look like a lot Allure-generated ones (http://allure.qatools.ru/) which we have successfully integrated with Karate. It was very easy to integrate them into our Jenkins and populate the results straight from the Pipelines.

Just my 2 cents there might be other tools available and easily plug-able.

@neillfontes Can you please share how have you integrated allure?

@avyasbms Sure!

def publishAllureReport() {
  script {
    allure([
            includeProperties: false,
            jdk              : '',
            properties       : [],
            reportBuildPolicy: 'ALWAYS',
            results          : [[path: 'target/surefire-reports']]
    ])
  }

And voi-la, works quite well.

@avyasbms Sure!

def publishAllureReport() {
  script {
    allure([
            includeProperties: false,
            jdk              : '',
            properties       : [],
            reportBuildPolicy: 'ALWAYS',
            results          : [[path: 'target/surefire-reports']]
    ])
  }

And voi-la, works quite well.

Does your report include all steps and details as well, like in cucumber-reports? I have similar setup in my CI and it creates all Scenarios but doesn't have any details on steps.

@avyasbms Just the Scenarios are described in Allure reports.

We also publish the HTML reports (https://jenkins.io/doc/pipeline/steps/htmlpublisher/) and this one does describe the steps properly and can be used for debugging.

Opened a similar issue #1432 with Extent report POC.
Waiting for a response from Karate team.

Was this page helpful?
0 / 5 - 0 ratings