0

I am facing issue with - io.cucumber.core.backend.CucumberBackendException: Please annotate a glue class with some context configuration issue when upgrading Spring , Gradle

Gradle - 7.6 , Spring boot - 3.0.2, Intellij - 2022.3.2, Java - 17, 

build.gradle

 testImplementation"io.cucumber:cucumber-spring:7.11.1 
 testImplementation"io.cucumber:cucumber-junit:7.11.1"

Folder Structure:

enter image description here

Please note that this set was working before the upgrade. I am really not sure what is missing.

EndToEndTestsCoverage:

@RunWith(Cucumber::class)
@CucumberOptions(
        glue = ["com.xxx.endToEndTests.steps"],
        features = ["classpath:com/xxx/endToEndTests/features"])
@ActiveProfiles("test")
class EndToEndTestsCoverage

Config:

@ContextConfiguration
@SpringBootTest(classes = [(com.xxx.Application::class)], webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT)
Rasika
  • 21
  • 5
  • 1
    Projects typically include a CHANGELOG and release notes in their source code. These inform you about new features and breaking changes. Have you tried reading those? – M.P. Korstanje Feb 13 '23 at 17:14
  • This issue is resolved now by adding config path to glue as mentioned in https://stackoverflow.com/questions/63562903/is-additional-context-configuration-required-when-upgrading-cucumber-jvm-from-ve. Now facing "Undefined Scenarios" issue even though the feature and step file is linked. – Rasika Feb 13 '23 at 18:15
  • Your IDE and Cucumber are two independent systems. Just because one can understand, the other may not. So maybe https://stackoverflow.com/questions/60803971/unable-to-run-test-in-mavencucumber/60813339#60813339 – M.P. Korstanje Feb 13 '23 at 18:35
  • But probably you should ask a new question. – M.P. Korstanje Feb 13 '23 at 18:35
  • Thanks for your reply. This issue is fixed now. Dependency files also need to be aligned. I was using io.cucumber but importing from cucumber.java. Changed the import also from io.cucumber. – Rasika Feb 14 '23 at 17:19

0 Answers0