Closed sivarubyN closed 6 years ago
This is the same as issue #56
Can you share a small sample? This may be an issue with the way counts are calculated in the extent api itself.
This issue should now be fixed with the latest. Releasing it right away, use version 3.1.1.
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
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
@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
@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.
Thanks @Fraser1994. I think Once it get merged with the master,Then I will update the version of Cucumber-extentsreports.
Thanks
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?
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("");
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
Observation 2 - If any scenarios got failed the out put report is showing all scenarios failed
![iffailure heppend](https://user-images.githubusercontent.com/28802341/29113023-70d8afe8-7d0d-11e7-9a79-37e869ed3ae5.PNG)