【问题标题】:When I run wdio-runner, I have got "wdio-cli: Can't identify message from worker" warning message当我运行 wdio-runner 时,我收到“wdio-cli:无法识别来自工作人员的消息”警告消息
【发布时间】:2019-02-18 09:05:28
【问题描述】:

我遇到了 WebdriverIO 和 Cucumber 的问题。

我使用了最新版本的 WebdriverIO (@v5.x.x) 和 Cucumber v4。当我运行我的测试套件时,控制台会显示一条警告消息。此外,在此过程中不会创建 Cucumber .json 数据文件。

警告信息:

警告 wdio-cli:无法识别来自工作人员的消息:

这是我的package.json 文件:

  "dependencies": {
    "@wdio/allure-reporter": "^5.4.16",
    "@wdio/cli": "^5.4.17",
    "@wdio/local-runner": "^5.4.17",
    "@wdio/selenium-standalone-service": "^5.4.14",
    "@wdio/spec-reporter": "^5.4.15",
    "chai": "^4.2.0",
    "cucumber": "^4.0.0",
    "moment": "^2.24.0",
    "wdio-cucumber-framework": "^2.2.8",
    "webdriverio": "^5.4.17"
  },
  "devDependencies": {
    "@babel/cli": "^7.2.3",
    "@babel/core": "^7.2.2",
    "@babel/preset-env": "^7.3.1",
    "@babel/register": "^7.0.0"
  },

这是控制台输出:

"C:\Program Files\nodejs\node.exe" D:\Git\Aydes-Wdio\e2e\node_modules\@wdio\cli\bin\wdio.js Conf/wdio.conf.js --suite Test
2019-02-18T08:52:46.911Z DEBUG wdio-config: @wdio/sync not found, running tests asynchronous
2019-02-18T08:52:47.729Z DEBUG wdio-cli:run: Run suite with config Conf/wdio.conf.js and params { _: [ 'Conf/wdio.conf.js' ],
  suite: [ 'Test' ],
  '$0': 'node_modules\\@wdio\\cli\\bin\\wdio.js' }
c????  1 running, 0 passed, 0 failed, 1 total (0% completed)
????  1 running, 0 passed, 0 failed, 1 total (0% completed)
????  1 running, 0 passed, 0 failed, 1 total (0% completed)
????  1 running, 0 passed, 0 failed, 1 total (0% completed)
????  1 running, 0 passed, 0 failed, 1 total (0% completed)
????  1 running, 0 passed, 0 failed, 1 total (0% completed)
????  1 running, 0 passed, 0 failed, 1 total (0% completed)
c
Stdout:
2019-02-18T08:52:48.887Z INFO wdio-cli:Launcher: Run onPrepare hook
2019-02-18T08:52:51.456Z INFO wdio-local-runner: Start worker 0-0 with arg: Conf/wdio.conf.js,--suite,Test
2019-02-18T08:53:05.197Z DEBUG wdio-local-runner: Runner 0-0 finished with exit code 0
2019-02-18T08:53:05.199Z INFO wdio-cli:Launcher: Run onComplete hook

Stderr:
2019-02-18T08:53:00.118Z WARN wdio-cli: Can't identify message from worker: {"event":"suite:start","cid":"0-0","uid":"Demo Page of Google1","title":"Demo Page of Google","pending":false,"parent":null,"type":"suite","file":"Web\\Features\\Test.feature","err":{},"runner":{"0-0":{"maxInstances":5,"browserName":"chrome"}},"specs":["D:\\Git\\Aydes-Wdio\\e2e\\Web\\Features\\Test.feature"],"tags":[],"keyword":"Feature"}, ignoring!
2019-02-18T08:53:00.137Z WARN wdio-cli: Can't identify message from worker: {"event":"suite:start","cid":"0-0","uid":"Search a text in Google3","title":"Search a text in Google","pending":false,"parent":"Demo Page of Google1","type":"suite","file":"Web\\Features\\Test.feature","err":{},"runner":{"0-0":{"maxInstances":5,"browserName":"chrome"}},"specs":["D:\\Git\\Aydes-Wdio\\e2e\\Web\\Features\\Test.feature"],"tags":[],"keyword":null}, ignoring!
2019-02-18T08:53:00.140Z WARN wdio-cli: Can't identify message from worker: {"event":"test:start","cid":"0-0","uid":"I open \"http://www.google.com\" the website4","title":"I open \"http://www.google.com\" the website","pending":false,"parent":"Search a text in Google3","type":"test","file":"Web\\Features\\Test.feature","err":{},"duration":0,"runner":{"0-0":{"maxInstances":5,"browserName":"chrome"}},"specs":["D:\\Git\\Aydes-Wdio\\e2e\\Web\\Features\\Test.feature"],"tags":[],"featureName":"Demo Page of Google","scenarioName":"Search a text in Google","keyword":null}, ignoring!
2019-02-18T08:53:04.769Z WARN wdio-cli: Can't identify message from worker: {"event":"test:pass","cid":"0-0","uid":"I open \"http://www.google.com\" the website4","title":"I open \"http://www.google.com\" the website","pending":false,"parent":"Search a text in Google3","type":"test","file":"Web\\Features\\Test.feature","err":{},"duration":4629,"runner":{"0-0":{"maxInstances":5,"browserName":"chrome"}},"specs":["D:\\Git\\Aydes-Wdio\\e2e\\Web\\Features\\Test.feature"],"tags":[],"keyword":"Given "}, ignoring!
2019-02-18T08:53:04.771Z WARN wdio-cli: Can't identify message from worker: {"event":"suite:end","cid":"0-0","uid":"Search a text in Google3","title":"Search a text in Google","pending":false,"parent":"Demo Page of Google1","type":"suite","file":"Web\\Features\\Test.feature","err":{},"duration":4634,"runner":{"0-0":{"maxInstances":5,"browserName":"chrome"}},"specs":["D:\\Git\\Aydes-Wdio\\e2e\\Web\\Features\\Test.feature"],"tags":[],"keyword":null}, ignoring!
2019-02-18T08:53:04.773Z WARN wdio-cli: Can't identify message from worker: {"event":"suite:end","cid":"0-0","uid":"Demo Page of Google1","title":"Demo Page of Google","pending":false,"parent":null,"type":"suite","file":"Web\\Features\\Test.feature","err":{},"duration":4655,"runner":{"0-0":{"maxInstances":5,"browserName":"chrome"}},"specs":["D:\\Git\\Aydes-Wdio\\e2e\\Web\\Features\\Test.feature"],"tags":[],"keyword":null}, ignoring!

Test Suites:     1 passed, 1 total (100% completed)
Time:        ????  16.46s


Process finished with exit code 0

【问题讨论】:

    标签: webdriver-io cucumberjs


    【解决方案1】:

    我发现了我的错误。

    这里解释了为什么 cucumber 不能在 wdio V5 上运行

    要使用 Cucumber,您必须使用 WebdriverIO v4,直到框架迁移到 v5

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-04-21
      • 2022-07-14
      • 2023-01-05
      • 1970-01-01
      • 2020-04-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多