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

Cucumber 10.0.0 changes execution order of the feature files when paths configuration is provided #2343

Closed
pk opened this issue Oct 19, 2023 · 6 comments · Fixed by #2345
Closed
Assignees
Labels
🐛 bug Defect / Bug ✅ accepted The core team has agreed that it is a good idea to fix this

Comments

@pk
Copy link

pk commented Oct 19, 2023

👓 What did you see?

We use configuration profiles with paths attribute to enforce execution order in our E2E test suites:

export const ciexcludebugs = {
  ...JSON.parse(JSON.stringify(common)),
  tags: '(not @bug) and (not @ignore)',
  paths: [
    'fixtures/',
    'features/'
  ]
}

In 9.x.x all fixtures (subfolders, and respective *.feature files) have been executed first and the features after that.
Since 10.x.x the order is reversed and features are always the first.

We have fixtures and features (both Cucumber feature files). fixtures contains cucumber feature files which execute and each saves a state of our server into a json file - we generate re-usable state & we test our management features.

✅ What did you expect to see?

The Cucumber should execute the feature files in the specified order from the Profile paths (or command line) and then, within the folders alphabetically as in 9.x.x.

📦 Which tool/library version are you using?

Cucumber 10.0.0
Node.js 20.8.1

🔬 How could we reproduce it?

Use profile paths as above or cucumber-js fixtures/ features/

@pk
Copy link
Author

pk commented Oct 19, 2023

I've been going through the open issues and I'm not sure if this one is relevant or not to my use case: #2253

@davidjgoss
Copy link
Contributor

Thanks for raising @pk. I think this has come from the upgrade to the latest glob which we did before the 10.0.0 release and included some changes to ordering which we had to adapt. I'll take a look and see what we can do to fix.

@davidjgoss davidjgoss self-assigned this Oct 19, 2023
@davidjgoss davidjgoss added 🐛 bug Defect / Bug ✅ accepted The core team has agreed that it is a good idea to fix this labels Oct 19, 2023
@pk
Copy link
Author

pk commented Oct 19, 2023

@davidjgoss I had to revert to @cucumber/cucumber@9.6.0 to have the (my) expected behaviour. Which I think is the latest 9x release, right?

@davidjgoss
Copy link
Contributor

@pk that's right yes.

@davidjgoss
Copy link
Contributor

@pk
Copy link
Author

pk commented Oct 23, 2023

Hi @davidjgoss , thank you for the quick fix and release.
We confirm the fix works, at least for our scenario.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Defect / Bug ✅ accepted The core team has agreed that it is a good idea to fix this
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants