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

Refactor RuntimeOptions.cucumberFeatures out of RuntimeOptions #1366

Closed
mpkorstanje opened this issue May 20, 2018 · 4 comments
Closed

Refactor RuntimeOptions.cucumberFeatures out of RuntimeOptions #1366

mpkorstanje opened this issue May 20, 2018 · 4 comments
Labels
good first issue Good for newcomers 🙏 help wanted Help wanted - not prioritized by core team 🧷 pinned Tells Stalebot not to close this issue

Comments

@mpkorstanje
Copy link
Contributor

Currently RuntimeOptions has too many responsibilities. In addition to managing the runtime options:

  • It parses command line options
  • It manages and instantiates plugins
  • It loads and instantiates cucumberFeatures

Ultimately RuntimeOptions should become an immutable data class that implements several different interfaces to be used by different consumers.

Solving this can be done in several steps. This is one such step:

RuntimeOptions.cucumberFeatures and related functions should be in their own CucumberFeatures class. The responsibility of emitting the TestRunStarted should be moved to the callers of cucumberFeatures.

So ultimately the dependency graph will be :

RuntimeOptions <--- CucumberFeatures <--- Runtime (use constructor dependency injection)
EventBus       <---|
ResourceLoader <---|
@mpkorstanje mpkorstanje added 🙏 help wanted Help wanted - not prioritized by core team good first issue Good for newcomers 🧷 pinned Tells Stalebot not to close this issue labels May 20, 2018
@aslakhellesoy
Copy link
Contributor

Sounds like a good plan. Do you think we could fit in config to populate RuntimeOptions with values @mpkorstanje?

@mpkorstanje
Copy link
Contributor Author

I'm making theses issues really small so any one can pick them up. Using config to populate run time options would be a separate task. There are a few more tasks that involve trimming down RuntimeOptions. After this is done implementing config would be easier.

mpkorstanje added a commit that referenced this issue Jun 5, 2018
[Core] Refactor Runtime

Extracting:
    Backend creation,
    Glue creation,
    Runner creation
    Feature compilation

from the runtime allows

    Tests on runners to skip the creation of Runtime
    Makes extracting Filter provider(#1352) and Feature provider(#1366) easier.
    Other runtimes such as JUnit and TestNg to skip the creation of the runtime
    --parallel (#1357), junit 5 (#1149) and pickle runner support.
    Clarifies the execution loop of Cucumber
@mpkorstanje
Copy link
Contributor Author

Closed by 56c3477

@lock
Copy link

lock bot commented Jun 5, 2019

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 Jun 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue Good for newcomers 🙏 help wanted Help wanted - not prioritized by core team 🧷 pinned Tells Stalebot not to close this issue
Projects
None yet
Development

No branches or pull requests

2 participants