微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

通过宁静获得 zalenium 的连接超时

如何解决通过宁静获得 zalenium 的连接超时

我正在使用 zalenium 来测试我的宁静测试用例。它在我本地安装的 zalenium 集群中运行良好。但在 Prod 中,我收到连接被拒绝的异常:

      net.serenitybdd.core.exceptions.SerenityManagedException: The following error occurred: java.net.ConnectException: Connection refused (Connection refused)
Build info: version: '3.141.59',revision: 'e82be7d358',time: '2018-11-14T08:17:03'
System info: host: 'p43885.intra.rakuten.co.jp',ip: 'fe80:0:0:0:ca6:f890:4645:5a02%en0',os.name: 'Mac OS X',os.arch: 'x86_64',os.version: '10.15.7',java.version: '1.8.0_271'
Driver info: org.openqa.selenium.remote.RemoteWebDriver
Capabilities {acceptInsecureCerts: true,browserName: chrome,browserVersion: 91.0.4472.77,chrome: {chromedriverVersion: 91.0.4472.19 (1bf021f248676...,userDataDir: /tmp/.com.google.Chrome.AnHccw},goog:chromeOptions: {debuggerAddress: localhost:40215},javascriptEnabled: true,networkConnectionEnabled: false,pageLoadStrategy: normal,platform: LINUX,platformName: LINUX,proxy: Proxy(manual,http=dev-prox...,setwindowRect: true,strictFileInteractability: false,timeouts: {implicit: 0,pageLoad: 300000,script: 30000},unhandledPromptBehavior: dismiss and notify,webauthn:extension:largeBlob: true,webauthn:virtualAuthenticators: true,webdriver.remote.sessionid: 8540f081814929eb81809ed9eb4...}
Session ID: 8540f081814929eb81809ed9eb4db7ad
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at org.openqa.selenium.remote.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:187)

我的宁静配置是这样的

webdriver.base.url = "https://urlName"
serenity {
  project.name = "qa-bdd-screenplay"
  take.screenshots = BEFORE_AND_AFTER_EACH_STEP
  test.root = "com.qa.test"
  tag.failures = "true"
  linked.tags = "issue"
  #  logging = "VERBOSE"
  restart.browser.for.each = scenario
  browser.maximized=true
}
serenity.proxy.http="Hostname"
serenity.proxy.http_port="XXXX"

// chrome driver & capabilities
webdriver.driver = remote
webdriver.remote.url = "https://hostname/wd/hub"
webdriver.remote.driver = chrome

chrome.capabilities.acceptSslCerts = true
chrome.capabilities.handlesAlerts = true
chrome.capabilities.acceptInsecureCerts = true
timeouts {
    implicitlywait = 20000
    fluentwait = 30000
}
//// firefox driver & capabilities
//webdriver.driver = firefox
//firefox.preferences = "browser.download.dir=/tmp;browser.helperApps.alwaysAsk.force=false;browser.download.manager.showWhenStarting=false;browser.download.useDownloadDir=true;browser.download.folderList=2;"

// iexplorer driver & capabilities
//webdriver.driver = iexplorer
//iexplorer.capabilities = "ie.ensureCleanSession=true;"

我的 zalenium 配置:

❯ kubectl get all
NAME                                        READY   STATUS    RESTARTS   AGE
pod/dpd-superdb-zalenium-40000-nbj7c        1/1     Running   0          68m
pod/dpd-superdb-zalenium-40000-txftk        1/1     Running   0          66m
pod/dpd-superdb-zalenium-7f9c55dfd8-vwm79   1/1     Running   0          15d

NAME                           TYPE       CLUSTER-IP      EXTERNAL-IP   PORT(S)        AGE
service/dpd-superdb-zalenium   NodePort   100.89.25.228   <none>        80:32364/TCP   16d

NAME                                   READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/dpd-superdb-zalenium   1/1     1            1           16d

NAME                                              DESIRED   CURRENT   READY   AGE
replicaset.apps/dpd-superdb-zalenium-7d9f57dbff   0         0         0       16d
replicaset.apps/dpd-superdb-zalenium-7f9c55dfd8   1         1         1       15d
replicaset.apps/dpd-superdb-zalenium-847cf4fd55   0         0         0       15d

我不确定这里有什么问题,我遗漏了网络配置中的某些内容。请让我知道如何调试并找到根本原因。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其他元素将获得点击?
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。)
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbcDriver发生异常。为什么?
这是用Java进行XML解析的最佳库。
Java的PriorityQueue的内置迭代器不会以任何特定顺序遍历数据结构。为什么?
如何在Java中聆听按键时移动图像。
Java“Program to an interface”。这是什么意思?