rozza
rozza

Reputation: 1016

How to exclude specific test in wdio.conf.js

I'm successfully excluding a whole feature file from my chrome runs, using the code below, but I have one specific test in a different feature file failing. I want to exclude the one failing scenario rather than the whole file. Is this possible?

capabilities: [
    {
       os: "Windows",
       os_version: "10",
       browser: "Chrome",
       exclude: [
         'features/myfeature.feature',
         'my failing scenario',
       ],
     },
],

Upvotes: 0

Views: 2245

Answers (2)

Kevin Lamping
Kevin Lamping

Reputation: 2269

No, it's not possible to exclude scenarios in that way. Instead, you could use tags to skip a particular scenario, similar to how it's done via the cucumber-boilerplate webdriverio project:

cucumberOpts: {
    tagExpression: 'not @Pending',
},

Upvotes: 1

Boris Osipov
Boris Osipov

Reputation: 71

You may add tag to this scenario e.g. @KnownIssue and exclude this tag by config

cucumberOpts:
{
....
tagExpression: "not @KnownIssue"
.....
}

Upvotes: 0

Related Questions