Closed lasektom closed 5 years ago
@lasektom are there global wdio package installed? check by npm -g ls | grep webdriverio
@BorisOsipov Thanks for coming back to me so quickly.
No, there are none. That command's result is pretty much nothing. Should I try installing webdriverio globally?
Should I try installing webdriverio globally?
No. just check that you don't have old global wdio packages
ERROR: ENOENT: no such file or directory, open '/app/bdd/features/example.feature:7'
Can you show full stacktrace?
That's the problem, there is none. I was trying to debug it on my own but with this level of information I could not get far hence this issue.
Here's all I have outputted in the terminal:
> webdriver.io@1.0.0 test /app
> wdio ./config/wdio.conf.js "--spec" "bdd/features/example.feature:7"
ERROR: ENOENT: no such file or directory, open '/app/bdd/features/example.feature:7'
chrome
Error: ENOENT: no such file or directory, open '/app/bdd/features/example.feature:7'
0 steps (0 passed, 0 failed, 0 pending)
Hi @hjagodzinski, can you help us with this?
As I see path like '/app/bdd/features/example.feature:7' passed to Cucumber.getTestCasesFromFilesystem()
and obviously cucumber can't find it on fs. Or I am missing smth
It is seems that's what is happening. I have debugged (console.log) the ConfigParser and it seems it returns path including the line number. I don't know if that was intended or not. Once again the path (excluding the line number) is correct on fs.
Hi @BorisOsipov, @lasektom
The intention was to pass a path with scenario number through ConfigParser. It worked for me as I expected because cucumber supports specifying scenario as a part of file path.
I suspect the issue steams from the different versions of wdio-cucumber-framework/cucumber I used and @lasektom is using. Of course, specifying scenario should still work in this case.
Without deeper investigation into this issue I won't be able to be more helpful.
Hi, @hjagodzinski can you specify what versions of wdio-cucumber-framework/cucumber you used? I guess regarding webdriverio, you must have used 4.14.1 as this is the only one that allows passing the line number through.
The project I was testing this change with has the following dependencies:
wdio-cucumber-framework: 0.3.1. cucumber: 1.3.1
Pretty old releases.
@hjagodzinski thanks for explanation. Now the issue is clear - need to make it works for wdio-cucumber-framework\cucumber 4.x versions
@hjagodzinski @BorisOsipov thanks guys!
👍
@lasektom @BorisOsipov I've created pull request #165 resolving the issue.
Recently I have updated webdriver and its dependencies to newer versions that according to documentation allows running specific scenario by specifying line number. More on the fix here: https://github.com/webdriverio/wdio-cucumber-framework/issues/78 Unfortunately that does not work for me. After running the following command:
I recieve the following error
The path of the feature file in the error is correct. It also works as expected when run with just feature file (without the line number) and without the feature file (the whole suite).
Here is the list of dependencies:
Please let me know if you need anything else. Thanks for help in advance.