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

How to Fail a step using cucumber extent report without throwing exception #106

Open
Ranjit2017 opened this issue Feb 15, 2019 · 0 comments

Comments

@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

1 participant