I am trying to get the test report generated dynamically after each step execution in cucumber feature file.Currently we are generating reports in @AfterClass testng annotation .The test reports will be generated only after complete execution.Is there any way to generate report dynamically?
Asked
Active
Viewed 1,021 times
1 Answers
0
AfterStep seems not to be available in Cucumber-JVM (assuming JVM, based on the syntax you used), for the reasons outlined in this thread.
If you are able to suffice with AfterScenario hooks instead, then this answer covers it and an example of what it may look like is below:
import cucumber.annotation.After;
@After
public void afterScenario() {
generateMyDocumentation();
}