0
我想运行测试环境,其中每个组件在docker(nightwatchjs,browsers,selenium server)中。 但现在我被困在找到正确的“设置”。我一直得到“连接被拒绝是Selenium开始的”。 这很奇怪,因为我以类似的方式设置了webdriverio,并且工作正常(从hulilabs回购库中分叉)。 https://github.com/MichalDulemba/webdriverio无法运行硒网格和夜间
有人可以帮忙吗?
如果一切正常,我会为其他人:)
码头工人组成一个gihub /泊坞窗枢纽回购:
version: '2'
services:
nightwatch:
image: dulemba/nightwatch
depends_on:
- chrome
- firefox
- hub
environment:
- HUB_PORT_4444_TCP_ADDR=hub
- HUB_PORT_4444_TCP_PORT=4444
volumes:
- /home/michal/Dokumenty/nw/nightwatch/app:/app
hub:
image: selenium/hub
ports:
- 4444:4444
firefox:
image: selenium/node-firefox-debug
ports:
- 5900
environment:
- HUB_PORT_4444_TCP_ADDR=hub
- HUB_PORT_4444_TCP_PORT=4444
depends_on:
- hub
chrome:
image: selenium/node-chrome-debug
ports:
- 5900
environment:
- HUB_PORT_4444_TCP_ADDR=hub
- HUB_PORT_4444_TCP_PORT=4444
depends_on:
- hub
NIGHTWATCH.JSON
{
"src_folders" : ["tests"],
"output_folder" : "reports",
"custom_commands_path" : "",
"custom_assertions_path" : "",
"page_objects_path" : "",
"globals_path" : "",
"selenium" : {
"start_process" : false,
"server_path" : "/opt/selenium/selenium-server-standalone.jar",
"log_path" : "",
"host" : "127.0.0.1",
"port" : 4444,
"cli_args" : {
"webdriver.chrome.driver" : "",
"webdriver.gecko.driver" : "",
"webdriver.edge.driver" : ""
}
},
"test_settings" : {
"default" : {
"launch_url" : "http://localhost",
"selenium_port" : 4444,
"selenium_host" : "localhost",
"silent": true,
"screenshots" : {
"enabled" : false,
"path" : ""
},
"desiredCapabilities": {
"browserName": "firefox",
"marionette": true
}
},
"chrome" : {
"desiredCapabilities": {
"browserName": "chrome"
}
},
"edge" : {
"desiredCapabilities": {
"browserName": "MicrosoftEdge"
}
}
}
}