What is the difference between running the selenium standalone server and hub/node setup

喜夏-厌秋 提交于 2020-01-02 03:42:07

问题


I started with the selnium stand alone server setup

java -jar selenium-server-standalone-2.32.0.jar

Which allowed to me successfully connect and run my tests, with multiple browsers running at a time.

What is the difference when i use the following set-up, as a hub...

java -jar selenium-server-standalone-2.42.2.jar -role hub 

and an attached node...

java -jar .\selenium-server-standalone-2.42.2.jar -role node -hub http://localhost:4444/grid/register

which also seemed to work the same.

Is the hub/node set-up my best option just purely for configuration flexibility?


回答1:


Hub/Node setup gives you the flexibility to run tests on different machines and different environment. Sometimes you may want to a run test in different browsers or different version of browsers ex on IE 6 to 10. In such cases you can setup multiple nodes with different versions of IE. While on single machine you cant have multiple versions of IE.
Also with Grid you can run multiple tests in parallel across different nodes. If your script doesn't demand such environments or parallel execution you can use single machine.




回答2:


Hub/Node is useful if you need to run tests on a variety of operating systems/browser configurations. For instance you could have Nodes running XP, Windows 7, Windows 8.1. Each of these machines could also be running a different version of each internet browser (if you need to support IE8 on Windows XP for instance). This allows you to test around a wide variety of configurations. I've found that running tests on my local machine is generally sufficient, but it really depends on the needs of your application.

For further reading check out:

http://www.guru99.com/introduction-to-selenium-grid.html and https://saucelabs.com/

Hope this helps!



来源:https://stackoverflow.com/questions/24303909/what-is-the-difference-between-running-the-selenium-standalone-server-and-hub-no

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!