0

im trying to setup a cucumber with spring project to use autowiring and spring config options (application.yml). Now that i created a runner class to pass parameters from outside executing runs on following exception:

Error Message

Weird is, i have a class exactly with the proposed annotations, so i guess it's not found and something on the project structure is off, but i don't get what exactly. Here is my project structure:

 src.main.java.package.config.SpringConfig.java
 src.main.java.package.steps.StepsSpringConfig.java
 src.test.java.package.runner.CucumberRunner.java

SpringConfig.java

@ComponentScan("package")
@EnableConfigurationProperties{PropertyClasses}

StepsSpringConfig.java

@SpringBootTest(classes = SpringConfig.class)
@CucumberContextConfiguration

All Step classes extend from this class

CucumberRunner.java

@RunWith(Cucumber.class)
@CucumberOptions(steps = path/to/features, glue = {src.package.steps, src.package.config})

In my JUnit RunConfig I use this runner class

When i run i get the error on the screenshot above. What am i missing? Im using the latest version of IntelliJ (2021.2.2) Im using Spring 2.3.12 and cucumber-junit 6.8.0

Krwasch
  • 29
  • 1
  • 7

1 Answers1

0

Ok im dumb, the solution is found here: Cucumber options annotation

i specified the glue path like "src.main.java.package.steps" but it needs to be just "package.steps" and it works fine

Krwasch
  • 29
  • 1
  • 7