与量角器一起使用multiCapabilities会导致EADDRINUSE错误 [英] Using multiCapabilities with protractor causes EADDRINUSE error

查看:89
本文介绍了与量角器一起使用multiCapabilities会导致EADDRINUSE错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用量角器来运行我的测试套件.如果我使用量角器的capabilities选项,则所有测试在所有三个主要浏览器(firefox,chrome,safari)上均可正常运行

I am using protractor to run my suite of test. If I use protractor's capabilities option, all the tests run fine on all three major browsers (firefox. chrome, safari)

但是,如果我这样使用multiCapabilities

However, If I use multiCapabilities as such

  multiCapabilities: [{
    'browserName': 'firefox'
  }, {
    'browserName': 'safari'
  }, {
    'browserName': 'chrome'
  }],

当其中两个通过时,我收到其中两个的EADDRINUSE错误(并不总是相同).我该如何解决:

I get an EADDRINUSE error for two of them (not always the same) while the other one passes. How can I fix this:

错误消息开始:

PID: 87414 (capability: safari #2)
Specs: /Users/nicolasmoise/Documents/Projects/otogo/otogo-direct/test/e2e/e2e.spec.js
Using the selenium server at http://localhost:4444/wd/hub


Error: listen EADDRINUSE
    at errnoException (net.js:904:11)
    at Server._listen2 (net.js:1042:14)
    at listen (net.js:1064:10)
    at Server.listen (net.js:1138:5)

推荐答案

EADDRINUSE表示listen()试图将服务器绑定到的端口号已在使用中.

EADDRINUSE means that the port number which listen() tries to bind the server to is already in use.

因此,在您的情况下,必须已经有某些设备在该端口上运行服务器.

So, in your case, there must be something running a server on that port already.

检查您的流程.

如何解决错误:使用nodejs时监听EADDRINUSE?

这篇关于与量角器一起使用multiCapabilities会导致EADDRINUSE错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆