简体   繁体   English

使用硒网格运行鼻子测试

[英]Run nosetest with selenium grid

I'm currently trying to run python UI automations using selenium grid and nosetest.我目前正在尝试使用硒网格和鼻子测试运行 python UI 自动化。 I finished setting up the hub and two nodes.我完成了集线器和两个节点的设置。 I tried to run the tests by the command below:我尝试通过以下命令运行测试:

nosetests-2.7 --tests=ui_tests/sample_tests.py --tc-file=conf/config.ini --nologcapture -v --with-holmium --holmium-browser=chrome --holmium-remote=http://<my_hub_ip>:4444/wd/hub --process-timeout=600 --holmium-browser-per-test --holmium-ignore-ssl-errors --processes=2

I get the error message on nodes below after some test cases finished running:一些测试用例完成运行后,我在以下节点上收到错误消息:

INFO:I/O exception (org.apache.http.nohttpresponseexception) caught when processing request to <>->http://<my_hub_ip>:4444: The target server failed to respond

I have done searching for this issue, but didn't find anything useful to solve the problem.我已经搜索了这个问题,但没有找到任何有用的东西来解决这个问题。 I'm wondering if it is because the VM that is acting as the hub is not powerful enough.我想知道是不是因为充当集线器的 VM 不够强大。

I'm using selenium-server-standalone-2.53.1 and nosetests-2.7 .我正在使用selenium-server-standalone-2.53.1nosetests-2.7

So I finally figured out the problem.所以我终于找到了问题所在。 Just download the newest version of selenium-server-standalone, it works perfectly.只需下载最新版本的 selenium-server-standalone,它就可以完美运行。 The version I'm using now is 3.0.1.我现在使用的版本是3.0.1。 They had a fix of the I/O exception in this version.他们在此版本中修复了 I/O 异常。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM