Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature request] Extent Reporting Framework integration #619

Closed
roundcent opened this issue Dec 11, 2018 · 18 comments
Closed

[feature request] Extent Reporting Framework integration #619

roundcent opened this issue Dec 11, 2018 · 18 comments

Comments

@roundcent
Copy link

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.

@ptrthomas
Copy link
Member

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

@roundcent
Copy link
Author

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

@ptrthomas
Copy link
Member

ptrthomas commented Dec 12, 2018

@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: #970 (comment)

@ptrthomas
Copy link
Member

@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

@roundcent
Copy link
Author

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.

@neillfontes
Copy link

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.

@roundcent
Copy link
Author

roundcent commented Dec 12, 2018

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.

@roundcent
Copy link
Author

@ptrthomas

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

@ptrthomas
Copy link
Member

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

@ksanchit2015
Copy link

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

@roundcent
Copy link
Author

@ksanchit2015

You can follow the thread below:

extent-framework/extentreports-java#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 :)

@avyasbms
Copy link

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?

@neillfontes
Copy link

@avyasbms Sure!

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

And voi-la, works quite well.

@avyasbms
Copy link

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

@neillfontes
Copy link

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

@suratdas
Copy link

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

@malagamjaga
Copy link

malagamjaga commented Dec 9, 2024

@ptrthomas Are we able to integrate karate framework with allure reports plugin? I am using vs code and github actions

@ptrthomas
Copy link
Member

@malagamjaga some teams seem to have done it - refer https://stackoverflow.com/a/54527955/143475

@karatelabs karatelabs locked as resolved and limited conversation to collaborators Dec 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants