File tree 1 file changed +23
-1
lines changed
cucumber-spring/src/main/java/io/cucumber/spring
1 file changed +23
-1
lines changed Original file line number Diff line number Diff line change 8
8
import java .lang .annotation .Target ;
9
9
10
10
/**
11
- * Configure an application context class that Cucumber should use
11
+ * This annotation is used on a configuration class to make the Cucumber aware
12
+ * of the test configuration. This is to be used in conjunction with
13
+ * {@code @ContextConfiguration}, {@code @ContextHierarchy} or
14
+ * {@code @BootstrapWith}. In case of SpringBoot, the configuration class can be
15
+ * annotated as follows:
16
+ * <p>
17
+ *
18
+ * <pre>
19
+ * @CucumberContextConfiguration
20
+ * @SpringBootTest(classes = TestConfig.class)
21
+ * public class CucumberSpringConfiguration {
22
+ * }
23
+ * </pre>
24
+ *
25
+ * Notes:
26
+ * <ul>
27
+ * <li>Only one glue class should be annotated with
28
+ * {@code @CucumberContextConfiguration} otherwise an exception will be
29
+ * thrown.</li>
30
+ * <li>Cucumber Spring uses Spring's {@code TestContextManager} framework
31
+ * internally. As a result a single Cucumber scenario will mostly behave like a
32
+ * JUnit test.</li>
33
+ * </ul>
12
34
*/
13
35
@ Retention (RetentionPolicy .RUNTIME )
14
36
@ Target (ElementType .TYPE )
You can’t perform that action at this time.
0 commit comments