Skip to content
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 for RuntimeOptions.merge and multiple @CucumberOptions #608

Closed
dimgit opened this issue Oct 17, 2013 · 5 comments
Closed

Support for RuntimeOptions.merge and multiple @CucumberOptions #608

dimgit opened this issue Oct 17, 2013 · 5 comments
Labels
⌛ stale Will soon be closed by stalebot unless there is activity

Comments

@dimgit
Copy link

dimgit commented Oct 17, 2013

Currently, the expectation is that there may be only one class annotated with CucumberOptions.
This is a bit limiting - specifically, with Android and running from Eclipse, there is not a good way to specify alternative options, without changing the ones already defined. This is needed in cases where a developer may want to use specific options while working on a task, for example, without modifying the project default CucumberOptions.

The suggestion here is to support multiple classes annotated with CucumberOptions. Then, all of them are merged, in order. This will also require ability to specify CucumberOptions merge order.

Merging here means overwrite the option if it already exists (was specified previously).

@klausbayrhammer
Copy link
Contributor

Currently you can use multiple RuntimeOptions, but only when the annotated classes are inherited (see #568). But I do like the idea of "merging" RuntimeOptions by a specified merge order (since the solution in #568 has no explicit merge strategy for boolean-attributes).

@brasmusson
Copy link
Contributor

Currently there is an inconsistency with respect to how the option types that can have multiple value (tags, features, glue) are "merged" when defined in more than one place.
@CucumberOptions(features = "dir1") + -Dcucumber.options="dir2" result in that the features option are set to "dir2".
@CucumberOptions(features = "dir1") in super class + @CucumberOptions(features = "dir2") in sub class result in that the features options are set to "dir1 dir2".
I read "Merging here means overwrite the option if it already exists (was specified previously)" in this pull request description, as it is the @CucumberOptions(features = "dir1") + -Dcucumber.options="dir2" behavior we want.
This issue surfaced in #622, when duplicate glue paths were defined when the runner class had a super class which were in the same package.

@stale
Copy link

stale bot commented Oct 26, 2017

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in a week if no further activity occurs.

@stale stale bot added the ⌛ stale Will soon be closed by stalebot unless there is activity label Oct 26, 2017
@stale
Copy link

stale bot commented Nov 2, 2017

This issue has been automatically closed because of inactivity. You can support the Cucumber core team on opencollective

@stale stale bot closed this as completed Nov 2, 2017
@lock
Copy link

lock bot commented Nov 2, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Nov 2, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
⌛ stale Will soon be closed by stalebot unless there is activity
Projects
None yet
Development

No branches or pull requests

3 participants