Skip to content
This repository has been archived by the owner on Jan 15, 2023. It is now read-only.

Failure scenario count #60

Closed
sivarubyN opened this issue Aug 9, 2017 · 10 comments
Closed

Failure scenario count #60

sivarubyN opened this issue Aug 9, 2017 · 10 comments

Comments

@sivarubyN
Copy link

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
Copy link

This is the same as issue #56

@anshooarora
Copy link
Contributor

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

anshooarora added a commit to anshooarora/extentreports-java that referenced this issue Nov 17, 2017
@anshooarora
Copy link
Contributor

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

@anshooarora
Copy link
Contributor

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.

#68

@rajinnovent
Copy link

rajinnovent commented Nov 20, 2017

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
Copy link

@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
Copy link

@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
Copy link

rajinnovent commented Nov 24, 2017

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

Thanks

@ShankaranarayananBR
Copy link

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
Copy link

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("");

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants