【问题标题】:How to exclude specific test in wdio.conf.js如何在 wdio.conf.js 中排除特定测试
【发布时间】:2018-08-16 12:47:51
【问题描述】:

我使用下面的代码成功地从我的 chrome 运行中排除了整个功能文件,但我在不同的功能文件中进行了一个特定的测试失败。我想排除一个失败的场景而不是整个文件。这可能吗?

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

【问题讨论】:

    标签: selenium webdriver-io


    【解决方案1】:

    不,不可能以这种方式排除场景。相反,您可以使用标签来跳过特定场景,类似于how it's done via the cucumber-boilerplate webdriverio project:

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

    【讨论】:

      【解决方案2】:

      您可以在此场景中添加标签,例如@KnownIssue 并通过配置排除此标签

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

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2020-06-28
        • 2022-12-24
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多