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

Inherit Information of @Cucumber.Options #568

Closed
klausbayrhammer opened this issue Aug 7, 2013 · 4 comments
Closed

Inherit Information of @Cucumber.Options #568

klausbayrhammer opened this issue Aug 7, 2013 · 4 comments

Comments

@klausbayrhammer
Copy link
Contributor

We have a lot of different JUnit tests which run different cucumber features. All of these tests share some common options (e.g. the glue path, tags or a common formatter). Some of these tests have to include specific formatters or tags. At the moment it is not possible to inherit the common options of a '''BaseTest''' to a ''SpecificTest''', so we have to specifiy all required options in every specific test.

We would like to do something like the following where the SpecificTest will have the glue from the BaseTest and both the CommonFormatter and the SpecificFormatter.

@RunWith(Cucumber.class)
@Cucumber.Options(format = "org.CommonFormatter", glue = "org.glue.path")
public class BaseTest
{
}

...

@Cucumber.Options(format = "org.SpecificFormatter")
public class SpecificTest extends BaseTest
{
}
@aslakhellesoy
Copy link
Contributor

Sounds reasonable, but only if the base class is abstract (otherwise JUnit might run the base class twice).

Are you going to send a pull request for this?

@klausbayrhammer
Copy link
Contributor Author

Sure, I'll code it next week.

klausbayrhammer pushed a commit to klausbayrhammer/cucumber-jvm that referenced this issue Aug 20, 2013
inherit information of cucumber.options from superclass to subclass
 * add additional information of multioptions like formatters
 * override single-options like monochrome
@aslakhellesoy
Copy link
Contributor

Thanks a lot @klausbayrhammer. I had to fix a broken test. Next time, please send a pull request (that causes travis to verify that the code is good).

mfellner added a commit that referenced this issue Aug 27, 2013
# By Aslak Hellesøy (1) and bayrhammerklaus (1)
# Via Aslak Hellesøy
* 'master' of github.com:cucumber/cucumber-jvm:
  Attribution. Fix broken test. Closes #568
  #568 Inherit Information of @Cucumber.Options
mfellner added a commit that referenced this issue Sep 6, 2013
# By Aslak Hellesøy (9) and others
# Via Dmytro Chyzhykov (2) and others
* master:
  [TestNG] Java Calculator TestNG example project - #579 issue.
  [Jython] Access to scenario in Before and After hooks. Closes #582.
  Scenario Outlines: Replace tokens in the names of the generated "Example Scenario"s.
  Change some remaining Cucumber.Options to CucumberOptions
  No longer used
  No longer used
  master is SNAPSHOT
  Java Calculator TestNG example project.
  Enable Wicket example, using HtmlUnitDriver so it runs on Travis. Upgraded maven plugins.
  is deprecated in favour of . Closes #549
  Disable wicket example for now
  Updated History.md with Android improvements. Ref #547 and #574.
  Attribution. Fix broken test. Closes #568
  Enable wicket example. Removed incorrect comment about cargo requiring Java 7. It does not. (Jetty 9 does, but we're on 8 now).
  #568 Inherit Information of @Cucumber.Options
@lock
Copy link

lock bot commented Oct 25, 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 Oct 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants