Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

@sivarubyN sivarubyN commented Aug 9, 2017

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

@Fraser-M-Hurley Fraser-M-Hurley commented Aug 12, 2017

This is the same as issue #56

@anshooarora
Copy link
Contributor

@anshooarora anshooarora commented Aug 13, 2017

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

@anshooarora anshooarora commented Nov 17, 2017

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

@anshooarora
Copy link
Contributor

@anshooarora anshooarora commented Nov 17, 2017

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

@rajinnovent rajinnovent commented Nov 21, 2017

@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

@Fraser-M-Hurley Fraser-M-Hurley commented Nov 23, 2017

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

@ShankaranarayananBR ShankaranarayananBR commented Jun 15, 2018

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

@Ranjit2017 Ranjit2017 commented Feb 15, 2019

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 join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
6 participants
You can’t perform that action at this time.