extent-framework / extentreports-cucumber4-adapter

Cucumber4 Adapter for Extent Framework
http://extentreports.com/docs/versions/4/java/cucumber2.html
Apache License 2.0
39 stars 22 forks source link

extentreports-cucumber6-adapter : attaching screenshot to extent report doesnt work #62

Closed gbalaji94 closed 4 years ago

gbalaji94 commented 4 years ago

Hi @anshooarora

I am using extentreports-cucumber6-adapter,

        <dependency>
            <groupId>tech.grasshopper</groupId>
            <artifactId>extentreports-cucumber6-adapter</artifactId>
            <version>1.0.0</version>
            <scope>test</scope>
        </dependency>

Issues :

  1. Scenario.embed doesn't work.
  2. Alternatively, I could use scenario.attach(screenshot, "image/png", scenario.getName());

This adds the attachment icon to the report, but the image is empty. Can you please help?

anshooarora commented 4 years ago

@gbalaji94 This would be the correct repository for this issue: https://github.com/grasshopper7/extentreports-cucumber6-adapter. Copying @grasshopper7

This can be fixed by using a relative path from https://github.com/extent-framework/extentreports-cucumber4-adapter/blob/master/config/extent.properties#L31

extent.reporter.spark.out=test-output/SparkReport/

screenshot.dir=test-output/
screenshot.rel.path=../

So considering the above, if you are saving your report in test-output/SparkReport/Spark.html, and your images to test-output/, your relative path would be to tell the report to look 1 level up, from SparkReport/.html -> test-output. Thus the ../../ as the relative path.

grasshopper7 commented 4 years ago

@gbalaji94 If u are still having the issue even after trying the settings above, feel free to open an issue at - https://github.com/grasshopper7/extentreports-cucumber6-adapter/issues. Thanks