[cucumber-jvm] @BeforeStep and @AfterStep Usage example

809 views
Skip to first unread message

Deena P

unread,
Aug 21, 2018, 9:50:35 AM8/21/18
to Cukes
Can anybody provide me some example of @BeforeStep and @AfterStep usages?
Looks like documentation is not updated https://docs.cucumber.io/cucumber/#beforestep.
I have a requirement of integration ExtentReport v3.x with cucumber-jvm v3.x. So I want to get the step name and step status, and can be added to the extentReport.

Thank you.

Björn Rasmusson

unread,
Aug 21, 2018, 11:56:15 AM8/21/18
to Cukes
Hook, like @BeforeStep and @AfterStep, are intended for the execution of test cases from the feature files, not for reporting. Formatters that are intended for reporting. Therefore use an custom formatter for the integration with ExtentReport. Have a look at the built in ones in the source:
 

Thank you.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages