1

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)
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? Commented Feb 13, 2023 at 17:14
  • This issue is resolved now by adding config path to glue as mentioned in stackoverflow.com/questions/63562903/…. Now facing "Undefined Scenarios" issue even though the feature and step file is linked. Commented Feb 13, 2023 at 18:15
  • Your IDE and Cucumber are two independent systems. Just because one can understand, the other may not. So maybe stackoverflow.com/questions/60803971/… Commented Feb 13, 2023 at 18:35
  • But probably you should ask a new question. Commented Feb 13, 2023 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. Commented Feb 14, 2023 at 17:19

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.