Skip to content

Use just-in-time property parsing #3220

Description

@mpkorstanje

🤔 What's the problem you're trying to solve?

Cucumber was originally written as a CLI only tool. It would parse the properties into a RuntimeOptions object which is then be passed around internally.

This is a problem as it requires every property to be known up front. But as Cucumber is extensible, this isn't possible and leads to complicated changes to interfaces (#3151).

It also conflicts with the JUnit Platform which only provides the value of property on request. So we can't proactive parse all properties, resulting in duplication between CucumberConfiguration and RuntimeOptions.

✨ What's your proposed solution?

Ideally we'd adopt the architecture from the JUnit Platform where we pass a ConfigurationParameters interface around and all parts of Cucumber that need something from it. For cucumber-core we can also introduce a CoreConfigurationParameters implementation that parses all values needed by the cor and is passed around only in the core.

⛏ Have you considered any alternatives or workarounds?

No response

📚 Any additional context?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions