Skip to content

Move io.cucumber.core.api.Scenario to backend implementation #1760

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

Closed
mpkorstanje opened this issue Aug 29, 2019 · 0 comments
Closed

Move io.cucumber.core.api.Scenario to backend implementation #1760

mpkorstanje opened this issue Aug 29, 2019 · 0 comments
Milestone

Comments

@mpkorstanje
Copy link
Contributor

mpkorstanje commented Aug 29, 2019

Summary

With the introduction of JPMS modules need to declare their dependencies. Additionally they need to declare which transitive modules their consumers have to depend on via require transitive. To keep this structure simple we should remove the need to end users to depend on cucumber-core.

So:

  • Replace io.cucumber.core.api.Scenario with io.cucumber.java.Scenario and io.cucumber.java8.Scenario
  • Deprecate TypeRegistry and TypeRegistryConfigurer in favor of the @ParameterType annotation and friends.

Expected Behavior

package io.cucumber.examples.java;

import io.cucumber.java.Scenario;
import io.cucumber.java.After;
import io.cucumber.java.Before;

public class RpnCalculatorSteps {
    private RpnCalculator calc;

    @Before("not @foo")
    public void before(Scenario scenario) {

    }

    @After
    public void after(Scenario scenario) {
    }
}

Current Behavior

package io.cucumber.examples.java;

import io.cucumber.core.api.Scenario;
import io.cucumber.java.After;
import io.cucumber.java.Before;

public class RpnCalculatorSteps {
    private RpnCalculator calc;

    @Before("not @foo")
    public void before(Scenario scenario) {

    }

    @After
    public void after(Scenario scenario) {
    }
}

Possible Solution

  1. Add io.cucumber.core.backend.Scenario and make it extend io.cucumber.java.Scenario. This will be the scenario representation that Cucumber uses to it's internal components.

  2. Add io.cucumber.java.Scenario that extends io.cucumber.core.api.Scenario. This will be the scenario representation the cucumber-java module uses to the end user.

  3. Deprecate io.cucumber.core.api.Scenario and eventually remove it.

@mpkorstanje mpkorstanje added this to the 5.x.x milestone Aug 29, 2019
@mpkorstanje mpkorstanje modified the milestones: 5.x.x, 5.0.0 Sep 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant