-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support @CucumberContextConfiguration as a meta-annotation #2491
Comments
It should be possible to use This is currently checked in both the cucumber-jvm/spring/src/main/java/io/cucumber/spring/SpringFactory.java Lines 103 to 105 in 5853a06
Additionally the |
…tion Using @CucumberContextConfiguration as a meta-annotation caused a CucumberBackendException because SpringFactory only realized raw use of the class. Method hasCucumberContextConfiguration does now recognize the use of @CucumberContextConfiguration as meta-annotation or with inheritance. Also SpringBackend#loadGlue filters out abstract classes and interfaces to not try to instantiate what cannot be instantiated.
Hi, I tried to implement the suggested changes. Hope I got it right. But this is like my first commit, so any feedback is appreciated. |
…tion Adds suggestions from review: renames test package, more focused testing and updates the changelog. Method hasCucumberContextConfiguration now uses AnnotatedElementUtils isAnnotated with considers all merged annotations (including inherited and meta-annotation).
🤔 What's the problem you're trying to solve?
Support developers creating meta-annotations to wrap up common Spring testing stuff to also include
@CucumberContextConfiguration
All of the above works except for
@CucumberContextConfiguration
Additional context
Currently causes this as cucumber-spring tries to directly instantiate the annotated class before considering it may be a meta-annotation.
The text was updated successfully, but these errors were encountered: