Feature Request: Adding glueClass to CucumberOptions
See original GitHub issueSummary
I was wondering if the project would be open to add something like this:
/**
* @return class(es) to look for glue code (step definitions and hooks).
* Optional.
*/
Class<?>[] glueClass() default {};
To the CucumberOptions (which now seem to be split by test framework).
Context & Motivation
The use of actual classes allows the option for easier code refactoring (renaming the class containing the glue code will automatically also rename this since it is not a string).
We as well need a more fine granular configuration in our project on which classes should be loaded (we do have classes in the same package that should not be loaded together).
We currently have a custom runner based on an older cucumber version that implements this behavior for us.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:23 (15 by maintainers)
Top Results From Across the Web
Cucumber options annotation - Stack Overflow
I have successfully used something like: @RunWith(Cucumber.class) @Cucumber.Options( //this code will only look into "features/" folder for ...
Read more >Cucumber Tests in Spring Boot with Dependency Injection
We want to use Dependency Injection in our tests with Spring, so we'll add the cucumber-spring dependency on top of the common cucumber-java ......
Read more >Cucumber Reference - Cucumber Documentation
Cucumber can be used to implement automated tests based on scenarios described in your Gherkin feature files. Step Arguments. In the example given...
Read more >Index (Cucumber-JVM: Core 6.8.1 API) - Javadoc.io
Add a glue class to the test context. addDataTableType(DataTableTypeDefinition) - Method in interface io.cucumber.core.backend.
Read more >Selenium series: Implementing Cucumber - Octopus Deploy
To start we need to add two dependencies: cucumber-java and ... The cucumber-junit library allows us to execute Gherkin features and ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We don’t support classes yet but we would if were were to implement support for classes (don’t know to phrase this in English 😄 )
The important bit is that
loadGlue
is getting too many arguments. I’d rather see something like:Where you’d do
selectors.getSelectorsFor(PackageSelectors.class)
to get the package selectors.Please feel free to do so!