You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This works well when i dont add "com.cucumber.listener.ExtentCucumberFormatter:target/cucumber-reports/report.html" plugin in my TestRunner file. But as soon as i add this plugin it failed to create this object testNGCucumberRunner = new TestNGCucumberRunner(this.getClass());
Could you please suggest what am i doing wrong here!
The text was updated successfully, but these errors were encountered:
jainamit1712
changed the title
Adding ExtentCucumberFormatter plugin in testrunner file resulting in null pointer exception in testNGCucumberRunner.provideScenarios()
Adding ExtentCucumberFormatter plugin in testrunner file failed to create new TestNGCucumberRunner(this.getClass()); object
Nov 17, 2020
This works well when i dont add "com.cucumber.listener.ExtentCucumberFormatter:target/cucumber-reports/report.html" plugin in my TestRunner file. But as soon as i add this plugin it failed to create this object testNGCucumberRunner = new TestNGCucumberRunner(this.getClass());
Could you please suggest what am i doing wrong here!
@CucumberOptions(features= {"src\test\resources\FunctionalTests"},
glue= {"stepDefinitions"},
plugin = {"pretty",
"html:target/html/",
"json:target/json/file.json",
"com.cucumber.listener.ExtentCucumberFormatter:target/cucumber-reports/report.html"
},
strict=false,
dryRun=false,
monochrome = true,
tags= "@test"
)
public class TestRunner{
private TestNGCucumberRunner testNGCucumberRunner;
@parameters({"browsername"})
@BeforeClass(alwaysRun = true)
public void setUpClass(String browsername) throws Exception {
}
@test(groups = "cucumber", description = "Runs Cucumber Scenarios", dataProvider = "scenarios")
public void scenario(PickleWrapper pickle, FeatureWrapper cucumberFeature) throws Throwable {
testNGCucumberRunner.runScenario(pickle.getPickle());
}
@dataProvider
public Object[][] scenarios() {
return testNGCucumberRunner.provideScenarios();
}
@afterclass(alwaysRun = true)
public void tearDownClass() throws Exception{
testNGCucumberRunner.finish();
}
The text was updated successfully, but these errors were encountered: