i have a feature with 4 scenarios.I want to execute a method before each step of these scenarios.
Tried @Before,@after in stepdefination class with junit &cucumber.api.java.*======This is not working as discussed in below links: https://www.tutorialspoint.com/cucumber/cucumber_hooks.htm https://sukesh15.gitbooks.io/cucumber-jvm-test-framework-/content/cucumber_-_more_details/scenario_hooks.html http://stackoverflow.com/questions/24029341/before-doesnt-execute-in-java-cucumber-step https://github.com/cucumber/cucumber-jvm/issues/515
My code is as following in my [b:x2fyncfz]stepdefination[/b:x2fyncfz]: