Failure in before hook:Steps.beforeCenario(Scenario) java
up vote
0
down vote
favorite
I'm trying to create a Extent Report using follow code:
public static ExtentHtmlReporter htmlReporter;
public static ExtentReports extentReport;
public static ExtentTest extentTest;
@Before
public void beforeCenario(Scenario cenario) {
if(extentReport == null) {
extentReport = new ExtentReports();
htmlReporter = new ExtentHtmlReporter("src/test/resources/htmlReporter.html");
extentReport.attachReporter(htmlReporter);
}
extentTest = extentReport.createTest(cenario.getId());
}
@After
public void afterCenario(Scenario cenario) {
extentTest.log(Status.PASS, "Cenario "+ cenario.getName()+ "executado com sucesso!");
extentReport.flush();
}
But when I do this I get:
Failure in before hook:Steps.beforeCenario(Scenario)
Can you help me to fix it? Thanks
java cucumber-junit extentreports selenium-extent-report
add a comment |
up vote
0
down vote
favorite
I'm trying to create a Extent Report using follow code:
public static ExtentHtmlReporter htmlReporter;
public static ExtentReports extentReport;
public static ExtentTest extentTest;
@Before
public void beforeCenario(Scenario cenario) {
if(extentReport == null) {
extentReport = new ExtentReports();
htmlReporter = new ExtentHtmlReporter("src/test/resources/htmlReporter.html");
extentReport.attachReporter(htmlReporter);
}
extentTest = extentReport.createTest(cenario.getId());
}
@After
public void afterCenario(Scenario cenario) {
extentTest.log(Status.PASS, "Cenario "+ cenario.getName()+ "executado com sucesso!");
extentReport.flush();
}
But when I do this I get:
Failure in before hook:Steps.beforeCenario(Scenario)
Can you help me to fix it? Thanks
java cucumber-junit extentreports selenium-extent-report
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I'm trying to create a Extent Report using follow code:
public static ExtentHtmlReporter htmlReporter;
public static ExtentReports extentReport;
public static ExtentTest extentTest;
@Before
public void beforeCenario(Scenario cenario) {
if(extentReport == null) {
extentReport = new ExtentReports();
htmlReporter = new ExtentHtmlReporter("src/test/resources/htmlReporter.html");
extentReport.attachReporter(htmlReporter);
}
extentTest = extentReport.createTest(cenario.getId());
}
@After
public void afterCenario(Scenario cenario) {
extentTest.log(Status.PASS, "Cenario "+ cenario.getName()+ "executado com sucesso!");
extentReport.flush();
}
But when I do this I get:
Failure in before hook:Steps.beforeCenario(Scenario)
Can you help me to fix it? Thanks
java cucumber-junit extentreports selenium-extent-report
I'm trying to create a Extent Report using follow code:
public static ExtentHtmlReporter htmlReporter;
public static ExtentReports extentReport;
public static ExtentTest extentTest;
@Before
public void beforeCenario(Scenario cenario) {
if(extentReport == null) {
extentReport = new ExtentReports();
htmlReporter = new ExtentHtmlReporter("src/test/resources/htmlReporter.html");
extentReport.attachReporter(htmlReporter);
}
extentTest = extentReport.createTest(cenario.getId());
}
@After
public void afterCenario(Scenario cenario) {
extentTest.log(Status.PASS, "Cenario "+ cenario.getName()+ "executado com sucesso!");
extentReport.flush();
}
But when I do this I get:
Failure in before hook:Steps.beforeCenario(Scenario)
Can you help me to fix it? Thanks
java cucumber-junit extentreports selenium-extent-report
java cucumber-junit extentreports selenium-extent-report
asked Nov 8 at 16:55
Cleicy Guião
278
278
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53212561%2ffailure-in-before-hooksteps-beforecenarioscenario-java%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown