gpt4 book ai didi

cloud-foundry - 如何在 CloudFoundry 上运行 Selenium-Grid?

转载 作者:行者123 更新时间:2023-12-04 04:00:44 25 4
gpt4 key购买 nike

有人用 Gorouter 提供的路由在 CloudFoundry 上运行 Selenium-Grid 吗?

根据"Selenium-Grid Documentation"我们可以像这样将集线器地址传递给节点实例:

java -jar selenium-server-standalone.jar \ 
-role node \
-hub http://myhub.cf/grid/register

但是这个节点用本地地址和端口注册自己。

最佳答案

我已经找到了我的问题的解决方案 (Selenium v​​3.14.0)。

基于selenium-server-standalone的本地测试

  • 中心

    java -Xmx640M -jar selenium-server-standalone.jar -role hub -debug
  • 节点

    java -Xmx640M -jar selenium-server-standalone.jar -role node -debug \
    -hub http://localhost:4444/grid/register \
    -port 8080 -remoteHost http://localhost:8080

基于docker的CloudFoundry list

https://hub.docker.com/u/selenium/

中心

---
applications:
- name: selenium-hub
docker:
image: selenium/hub
instances: 1
memory: 1G
disk_quota: 1G
routes:
- route: selenium-hub.mycf.cloud
env:
JAVA_OPTS: "-Xmx640M"
GRID_DEBUG: false
# Max "browser" sessions a grid can handle
GRID_MAX_SESSION: 5

节点

---
applications:
- name: selenium-node-chrome-1
docker:
image: selenium/node-chrome
instances: 1
memory: 1G
disk_quota: 1.5G
routes:
- route: selenium-node-chrome-1.mycf.cloud
env:
JAVA_OPTS: "-Xmx640M"
GRID_DEBUG: false
HUB_HOST: selenium-hub.mycf.cloud
HUB_PORT: 80
NODE_PORT: 8080
REMOTE_HOST: http://selenium-node-chrome-1.mycf.cloud:80
# Max "browser" sessions a node can handle. Default determined by configuration type.
NODE_MAX_SESSION: 5

- name: selenium-node-firefox-1
docker:
image: selenium/node-firefox
instances: 1
memory: 1G
disk_quota: 1.5G
routes:
- route: selenium-node-firefox-1.mycf.cloud
env:
JAVA_OPTS: "-Xmx640M"
GRID_DEBUG: false
HUB_HOST: selenium-hub.mycf.cloud
HUB_PORT: 80
NODE_PORT: 8080
REMOTE_HOST: http://selenium-node-firefox-1.mycf.cloud:80
# Max "browser" sessions a node can handle. Default determined by configuration type.
NODE_MAX_SESSION: 5

关于cloud-foundry - 如何在 CloudFoundry 上运行 Selenium-Grid?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52624073/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com