Annotation Type Cucumber


@API(status=DEPRECATED) @Retention(RUNTIME) @Target(TYPE) @Testable @Deprecated public @interface Cucumber
Deprecated.
Please use the JUnit Platform Suite to run Cucumber in combination with Surefire or Gradle. E.g:

package com.example;

import org.junit.platform.suite.api.ConfigurationParameter;
import org.junit.platform.suite.api.SelectClasspathResource;
import org.junit.platform.suite.api.Suite;

import static io.cucumber.junit.platform.engine.Constants.GLUE_PROPERTY_NAME;

@Suite
@SelectClasspathResource("com/example")
@ConfigurationParameter(
   key = GLUE_PROPERTY_NAME,
   value = "com.example"
)
public class RunCucumberTest {
}
Test discovery annotation. Marks the package of the annotated class for test discovery.

Maven and Gradle do not support the DiscoverySelectors used by Cucumber. As a workaround Cucumber will scan the package of the annotated class for feature files and execute them.

Note about Testable: While this class is annotated with @Testable the recommended way for IDEs and other tooling use the selectors implemented by Cucumber to discover feature files.

See Also: