Skip to content

[🐛 Bug]: Since v8 --spec only works with full path to spec file #9495

@synedra-mpe

Description

@synedra-mpe

Have you read the Contributing Guidelines on issues?

WebdriverIO Version

latest

Node.js Version

16

Mode

WDIO Testrunner

Which capabilities are you using?

No response

What happened?

Before v8 it was possible to use the --spec option with only mentioning the spec file. wdio then figured out, which spec file to load, depending on den given specs glob pattern config. This was very convenient to quickly limit test execution to just one spec file and not the whole suite.

What is your expected behavior?

Entering, for configured specs glob pattern test/itests/js/specs/mainProduct/**/*Test.js

wdio run --spec LoginTest.js should be the same as eg.

wdio run --spec test/itests/js/specs/mainProduct/LoginTest.js

How to reproduce the bug.

Make use of the --spec cli option in a wdio project without giving the full path to the spec js file.

Relevant log output

2022-12-30T16:00:31.536Z WARN @wdio/config:ConfigParser: pattern test/itests/js/specs/mainProduct/**/*Test.js did not match any file

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bug 🐛good first picka reasonable task to start getting familiar with the code basehelp wantedIssues that are free to take by anyone interested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions