0
votes

I'm using commercehub-oss/gradle-cucumber-jvm-plugin. Would like to implement hooks for setup and teardown for the automation. Like in junit RunCukeTests, @BeforeClass and @AfterClass

How to implement these in automation for this plugin?

https://github.com/commercehub-oss/gradle-cucumber-jvm-plugin

1

1 Answers

0
votes

Cucumber offers a way to use hooks. You can annotate your hook with @Before to run before each scenario, or @After to run after each scenario. You can find more information in the docs.

Afaik it's recommended to use the hooks provided by Cucumber, as not all JUnit annotations are supported.