webdriverio: [π Bug]: Running a single scenario using the scenario line number is not working in @wdio/cucumber-framework version 7.11.0 and later
Have you read the Contributing Guidelines on issues?
- I have read the Contributing Guidelines on issues.
WebdriverIO Version
latest
Node.js Version
v14.18.1
Mode
WDIO Testrunner
Which capabilities are you using?
{
"browserName": "chrome",
}
What happened?
Update β@wdio/cucumber-frameworkβ to any version higher than 7.10.1 and notice if you try to ,Run scenario by line number eg
wdio.js run wdio.conf.js --spec
./tests/e2e/a.feature:5
It will run the entire feature file with all the scenarios
What is your expected behavior?
The scenario which is present in the specified line number should be executed
How to reproduce the bug.
In package.json upgrade the β@wdio/cucumber-frameworkβ: β7.16.6β, do an npm install and run any scenario in a feature file by passing the below command
say
wdio.js run wdio.conf.js --spec ./tests/e2e/a.feature:5
Note all the scenarios in the a.feature will be running, instead of the scenario present in line number 5
Relevant log output
The results of all the scenarios executed is displayed
Code of Conduct
- I agree to follow this projectβs Code of Conduct
Is there an existing issue for this?
- I have searched the existing issues
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 31 (24 by maintainers)
Sure, might be a week or so but Iβll try.
I will be closing this ticket. If anyone wants to raise a PR to apply changes made in #10772 to the
v7branch I am happy to merge and release that for everyone still using v7.@hammzj Totally understand! What is weird is it may not be that commit that is the errant code but that is exposed a flaw in logic in @wdio/cucumber-framework, like relying on
specsandspec.What order of operations for Cucumber scenario filtering is there? Keeping in mind we have 3 possible inputs for
--spec:@christian-bromann Working on figuring that out now. I am hoping that the V7 fix would carry over to V8 with minimal issues.
Fairly confident this is caused by #8432.