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

All features are run instead of none #1630

Closed
tommywo opened this issue May 13, 2019 · 3 comments · Fixed by #1631
Closed

All features are run instead of none #1630

tommywo opened this issue May 13, 2019 · 3 comments · Fixed by #1631
Labels
good first issue Good for newcomers 🙏 help wanted Help wanted - not prioritized by core team

Comments

@tommywo
Copy link
Contributor

tommywo commented May 13, 2019

Summary

If rerun report is empty and specified by cucumber.options property ALL features are run instead of none.
That doesn't happen when rerun file is specified in @CucumberOptions annotation.

Expected Behavior

None of features are run.

Current Behavior

All features are run when empty rerun report file is provided via cucumber.options property.

Possible Solution

  • Parse cucumber.options property in cucumber.runtime.RuntimeOptionsFactory before running addDefaultFeaturePathIfNoFeaturePathIsSpecified(args, clazz);

Steps to Reproduce

  1. Create empty rerun file
  2. Create testng cucumber test class
  3. Set cucumber.options to @empty-rerun-file.txt
  4. Run cucumber testng class
@tommywo tommywo changed the title [core] Running all features instead of none Running all features instead of none May 13, 2019
@tommywo tommywo added Bug and removed TestNG labels May 13, 2019
@tommywo tommywo changed the title Running all features instead of none All features are run instead of none May 13, 2019
@tommywo
Copy link
Contributor Author

tommywo commented May 13, 2019

I've created a workaround for this but i don't like the idea of parsing cucumber.options twice - so suggestions are welcomed.

@mpkorstanje
Copy link
Contributor

I reckon that if you add an condition here to check if this parse method encountered a rerun file as argument you can get the behavior to match again.

https://github.com/cucumber/cucumber-jvm/blob/master/core/src/main/java/cucumber/runtime/RuntimeOptions.java#L204

        if (!parsedFeaturePaths.isEmpty() || <did we use a rerun file?>) {
            featurePaths.clear();
            featurePaths.addAll(parsedFeaturePaths);
        }

@lock
Copy link

lock bot commented Jun 24, 2020

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 24, 2020
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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants