-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Mixing absolute and relative paths breaks native and custom formatters #1783
Labels
🐛 bug
Defect / Bug
Comments
Good find! Stryker passes glob expressions directly to cucumber-js a.t.m., so no issues as long as relative paths are used 🤷♂️ |
@jan-molak FYI I think the changes from @nicojs here #1708 may alleviate issue 1 to some extent. Regardless we have work to do around absolute paths, I'll aim to fix before the next RC. |
Released in 8.4.0 https://github.com/cucumber/cucumber-js/releases/tag/v8.4.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi team!
Consider:
/home/jan/project
features
directory with anexample.feature
file inside it/home/jan/project
When I run the latest Cucumber 7.3.1 as follows:
the following issues occur:
Issue 1 - feature files get executed twice
Cucumber doesn't understand that the relative
features/example.feature
is the same as the absolute/home/jan/project/features/example.feature
and runs the feature twice.Issue 2 - scenario location
undefined
Location of the duplicate scenarios returned by
parseTestCaseAttempt
andformatterHelpers.PickleParser.getPickleLocation(testCaseAttempt)
isundefined
.This breaks native formatters, such as
snippets
:as well as custom formatters, such as Serenity/JS - serenity-js/serenity-js#975
Issue 3 - Incorrect messages emitted
testCaseStarted
and related messages are emitted twice:Impact
The above issues are particularly problematic when Cucumber
rerun
feature is used (where the@rerun.txt
file contains relative paths to feature files), together with absolute paths to otherfeature
files, for example:where
@rerun.txt
:Also, when external frameworks such as Serenity/JS (maybe Stryker too? @nicojs?) allow users to specify paths to feature files as globs and then resolve those to absolute paths.
To Reproduce
See https://github.com/jan-molak/cucumber-rerun-bug
Note that in
package.json
I'm usingrealpath
to get the absolute path dynamically. This will probably not work on Windows, but you could replace that with the actual absolute path when debugging.The text was updated successfully, but these errors were encountered: