2

In my java, and maven project, I need to use @Before, @After, @BeforeStep, and @AfterStep. I have added the following dependency:

    <dependency>
        <groupId>info.cukes</groupId>
        <artifactId>cucumber-java</artifactId>
        <version>1.2.5</version>
    </dependency>

which supports the

import cucumber.api.java.After;
import cucumber.api.java.Before;

But, it seems that, it does NOT include:

import cucumber.api.java.AfterStep;
import cucumber.api.java.BeforeStep;

What is the cucumber maven dependency for @After, and @AfterStep?

Sal-laS
  • 11,016
  • 25
  • 99
  • 169

1 Answers1

1

That annotation is in cucumber-java in the current version but not in 1.2.5. So you could use a newer io.cucumber version, such as

    <dependency>
        <groupId>io.cucumber</groupId>
        <artifactId>cucumber-java</artifactId>
        <version>4.2.0</version>
    </dependency>
Ryan Dawson
  • 11,832
  • 5
  • 38
  • 61
  • if i remove `1.2.5` then when i run my test `CucumberException: No backends were found. Please make sure you have a backend module on your CLASSPATH.` – Jeff Dec 11 '18 at 08:24
  • That sounds to me like a separate question. Perhaps you could post a separate question with more detail and link back to it here? – Ryan Dawson Dec 11 '18 at 09:25