-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Description
Have you read the Contributing Guidelines on issues?
- I have read the Contributing Guidelines on issues.
WebdriverIO Version
7.16.16
Node.js Version
16.3.0
Mode
WDIO Testrunner
Which capabilities are you using?
No response
What happened?
When running yarn test:features in the root of the cucumber-boiler plate project (link provided in steps to reproduce), the number of workers created does not take cucumber tag filtering into account. In the file cucumber-boilerplate/wdio.conf.ts on line 176, if I replace tagExpression: 'not @Pending', with tagExpression: '@test', and then add the @test tag to 3 cucumber scenarios I see the following in the terminal.
╰─ yarn test:features
yarn run v1.22.10
$ wdio run wdio.BUILD.conf.ts
Execution of 30 workers started at 2022-04-19T21:06:27.792Z
This does not prevent the tests from starting, however in the case of our project, 280 workers created for large feature files is causing a 15 minute delay before the tests start.
What is your expected behavior?
If there are 3 scenarios tagged in 3 separate feature files, it should create 3 workers, not 30.
Please note, it is possible to create only one worker by adding an inner array to the array of spec files.
specs: [
['./src/features/**/*.feature'],
],
However I expect the behavior to be one worker per feature file so it is reported correctly at the end. See this article here: https://webdriver.io/blog/2019/11/01/spec-filtering/
How to reproduce the bug.
You can reproduce this in the cucumber boilerplate project here: https://github.com/webdriverio/cucumber-boilerplate
Steps to Reproduce:
- Clone the above project
- Run yarn install in the projects root directory
- Change line 176 in the file cucumber-boilerplate/wdio.conf.ts from
tagExpression: 'not @Pending',totagExpression: '@test',. - Add the @tag tag to 3 different scenarios in 3 different feature files located in
cucumber-boilerplate/src/features. The tag should be added in the line above the scenario name as such:
@test
Scenario: Test if element responds to button press
Given the element "#testKeyResponse" not contains any text
When I press "b"
Then I expect that element "#testKeyResponse" not contains the text "65"
- In the root directory of the project run
yarn test:features
Relevant log output
yarn run v1.22.10
$ wdio run wdio.BUILD.conf.ts
Execution of 30 workers started at 2022-04-19T21:06:27.792ZCode 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