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

Failure scenario count #60

Closed sivarubyN closed 6 years ago

sivarubyN commented 6 years ago

I have noticed the scenario count mismatch between the console out put and the report output for the scenario pie chart. Please refer the below observations and the attached screen shot. Observation 1- If all scenarios got passed when executing multiple scenarios in one feature the out put report is fine with the all counts if all passed Observation 2 - If any scenarios got failed the out put report is showing all scenarios failed executionhistory iffailure heppend

Fraser-M-Hurley commented 6 years ago

This is the same as issue #56

anshooarora commented 6 years ago

Can you share a small sample? This may be an issue with the way counts are calculated in the extent api itself.

anshooarora commented 6 years ago

This issue should now be fixed with the latest. Releasing it right away, use version 3.1.1.

anshooarora commented 6 years ago

Hi Vimal

I have updated pom.xml to latest version of the API and sent you a pull request - this issue should auto-fix once users download this version.

https://github.com/email2vimalraj/CucumberExtentReporter/pull/68

rajinnovent commented 6 years ago

HI Anshooarora Tried to download the latest version of CucumberExtentReports.

It shows error in Pom.xml when I change the version from 3.0.1 to 3.1.1.

Here is the dependency I am using

com.vimalselvam cucumber-extentsreport 3.1.1 . Is this correct? Or should I change the GroupId/Artifact ID
rajinnovent commented 6 years ago

@anshooarora 'Just an Update on the Issue regarding incorrect Count for the Report Generated for Scenario Outline. Should I change the ArtifactID or GroupID for cucumber-extentsreports. Still I get error in POM.XML when I change the version from 3.0.1 to 3.1.1.

Thanks

Fraser-M-Hurley commented 6 years ago

@rajinnovent believe that's because the pull request has not been approved/closed yet. Someone with write access to the repo has to approve the changes first.

rajinnovent commented 6 years ago

Thanks @Fraser1994. I think Once it get merged with the master,Then I will update the version of Cucumber-extentsreports.

Thanks

ShankaranarayananBR commented 6 years ago

Hi Vimal, I am using the cucumber extents report in my official project. I have am using the reporter.steplog() method for the logs.I will show a dummy implementation of how I am using it. @Then("^XXXXXXXXX$") public void XXXXXX() { try{ Thread.sleep(3000); Action.clickOnElement(BaseTest.driver.findElement(By.xpath(BaseTest.prop.getProperty("KeyString")))); System.out.println("XXXX : PASS"); Reporter.addStepLog("XXXXX : PASS"); } catch(Exception E){ System.out.println(E); System.out.println("XXXXX : FAIL"); Reporter.addStepLog("XXXXX : FAIL"); } } I am getting this result as pass as i have put it in the try-catch. If the element is not present it prints the catch statement as it should. But in my report the it still shows as green and passed. Can you show me a way to fail it if the operation is not successful?

Ranjit2017 commented 5 years ago

In my project I am using both Extent Report and Cucumber Extent Report.

Features i am getting from Extent report :- public static void logStart(String testname) throws ClassNotFoundException { // logger = extent.startTest("..." + testname); // logger = extent.logger = extent.createTest(testname, testname); Log.startTestCase(testname); } public static void reportInfo(String info) { logger.log(Status.INFO, info); Log.info(info); }

public static void reportPass(String testname) throws ClassNotFoundException {
    // logger = extent.createTest(testname, "");
    logger.log(Status.PASS, testname + " : Is Passed");
    Log.info(testname + " : is passed");

}

public static void reportLogFail(String testname, String stepName) throws IOException, ClassNotFoundException {
    logger.log(Status.FAIL, "Failed : " + stepName);
    Log.info("Failed : " + stepName);
    Log.FailedTestCase(testname);
}

But how i can get the same kind of methods in Cucumber extent report as its only give two methods

1.Reporter.addStepLog(""); 2.Reporter.addScenarioLog("");