Closed prasanjitmohanty closed 7 years ago
It is an issue with "cucumber": "~1.3.1" used which fails in case of multiple tags. The current version is 2.0.0 so my guess is doing a dependency upgrade will fix this for wdio-cucumber-framework.
I was struggling with this too and I think the issue is that old-style cucumber tags (e.g. in cucumber-js 1.3.1) are confusing (this is fixed with new-style cucumber tags: https://docs.cucumber.io/tag-expressions/#migrating-from-old-style-tags)
In your case:
tags: ['@P1','@P2']
would run scenarios tagged with @P1
AND @P2
tags: ['@P1,@P2']
would run scenarios tagged with @P1
OR @P2
- I think this is the one you wantWe don't support Cucumber v2 and I am not even sure if we ever will as it seems that we are not able to integrate WebdriverIO in a way we are with v1.x. Once v2 is finally released I will take a look again. Until then please use the solution suggested by @broder (thanks!).
Please don't close the issue. As the suggested approach is not working. Looks like wdio-cucumber-framework needs to handle this before passing it to the cucumber
If tags passed as tags: ['@P1 OR @P2'],
- It skips all tests
If tags passed as tags: '@P1 OR @P2',
- ERROR: tagGroupStrings.map is not a function
You need to pass tags as tags: ['@P1,@P2']
tags: ['@P1,@P2'] works. Thanks for the help
If I am specifying multiple tags e.g - tags: ['@P1','@P2'], in cucumberOpts the test runner ignores all tests without any error. I have test scenarios for both tags. It only works if only one tag or without any tag.
"webdriverio": ^4.6.2", "wdio-cucumber-framework": "^0.2.5",