email2vimalraj / CucumberExtentReporter

A plugin to generate the cucumber jvm custom html report using ExtentsReport
http://www.vimalselvam.com/cucumber-extent-reporter/
MIT License
58 stars 74 forks source link

Screenshot support for tests with scenario outlines #27

Closed gjarosz closed 7 years ago

gjarosz commented 7 years ago

I find scenario outline syntax quite useful for some of my tests, but screenshots are NOT embedded into extent reports for tests that use "Scenario Outline:" syntax.

(Please note, that for single scenario everything works fine for me. I have no problems with that)

Please find the problematic code part bellow:

public void embedding(String s, byte[] bytes) {
if (!scenarioOutlineTest) {
            String extension = (String)MIME_TYPES_EXTENSIONS.get(s);
            String fileName = "screenshot-" + System.currentTimeMillis() + "." + extension;
            this.writeBytesAndClose(bytes, this.reportFileOutputStream(fileName));
            scenarioTest.log(LogStatus.INFO, scenarioTest.addScreenCapture(fileName));
        }
    }

Is there a chance to have the support for adding screenshots for tests with scenario outlines as well?

Are there any problems with such support ?

email2vimalraj commented 7 years ago

Kindly try the latest version. Reopen in case you have issues.