了解关于EC2硒GRID2实施运行

2023-09-11 09:33:53 作者:我非寒冰为何心凉

我已经实现了硒网格由约GRID2稀疏/支离破碎的在线文档阅读和理解。 我国当前实现是 -

I have implemented Selenium Grid by reading and understanding from the sparse/fragmented online documentation about Grid2. My current implementation is-

webdriver的节点注册和EC2实例中运行的

java -jar selenium-server-standalone-2.8.0.jar -role webdriver -hub http://EC2_PUBLIC_IP:5555/grid/register -port 5556

中心登记,并在同一个EC2实例上运行

java -jar selenium-server-standalone-2.8.0.jar -role hub -hubhost EC2_PUBLIC_IP -port 5555

我在我的本地机器上运行从Eclipse的我webdriver的基础TestNG的测试。该驱动程序配置 驱动程序=新RemoteWebDriver(新的URL(HTTP:// EC2_PUBLIC_IP:5556 / WD /枢纽),能力);

I am running my Webdriver based TestNG tests from Eclipse on my local machine. The driver configuration is driver = new RemoteWebDriver(new URL("http://EC2_PUBLIC_IP:5556/wd/hub"), capability);

运行测试启动我的EC2实例浏览器。

Running the tests launches the browser on my EC2 instance.

我还在寻找一些悬而未决的问题,可能是很基本的,并会在他们身上AP preciate人的看法和理解。我想要一台机器,具有各自的节点上运行上都推出了我的浏览器。 EG-一台机器上运行webdriver的+ Firefox的节点应该推出相应的测试。

I am still looking for a few unanswered questions that may be very basic and would appreciate people's views or understanding on them. I want to have my browsers launched on a machine that has respective Node running on it. e.g- A machine running webdriver+firefox node should launch respective test.

如何在GRID2实施工作,如果我需要设置枢纽和节点的每个单独的机器上?我认为实现是不同的,如果它是一个 EC2Hub-LocalMachineNode 的组合,当它的 EC2Hub-EC2Node 组合。 在这两种情况下,我们为枢纽,webdriver的/ RC节点,在Selenium测试什么命令/网址是什么?请问这是因为大多数的在线文档谈本地主机和端口4444,但我想使这个通用的。 是否有端口/防火墙,同时设置此功能的具体设置? How does the Grid2 implementation works if I need to setup Hub and Node each on separate machines? I believe the implementation would be different if its a EC2Hub-LocalMachineNode combination AND when its an EC2Hub-EC2Node combination. In either cases, what command/URL do we provide for hub, webdriver/RC node and in the Selenium tests? I ask this because majority of online documentation speaks about "localhost" and port 4444, but I want to make this generic. Are there any specific settings for the ports/firewall while setting this up?

我可以从AWS门户网站,也是防火墙在我的本地这些端口以及EC2的机器上我的EC2实例打开端口5554-5559,以实现这一目标。

I was able to achieve this by opening ports 5554-5559 on my EC2 instance from the AWS portal and also the firewall for these ports on my local as well as EC2 machine.

请让我知道如果我不清楚,或不明确的任何一点。请问AP preciate你的解释。

Please let me know if I am unclear, or ambiguous at any point. Would appreciate your explanations.

推荐答案

有没有特殊考虑在EC2上运行的电网与其它任何网络环境。一切都通过HTTP端口可以配置完成。既然你几乎可以肯定不想让你的网格当众揭发,而且一切都在默认的安全组可以倾诉一切在同一网络上,你应该没有任何问题。

There's no special considerations for running grid on EC2 versus any other networking environment. Everything is done via HTTP on ports you can configure. Since you almost certainly don't want your grid publicly exposed and everything in the default security group can talk to everything else on the same network, you shouldn't have any problems.

您可以通过命令行或通过JSON配置文件配置的事情。我preFER后者。默认的配置文件可以在谷歌code 。你会注意到那里的装有Hubport的价值。没有显示,但有效的,是一个hubHost配置项。只是设置在轮毂的主机名。

You can either configure things from the command-line or through a JSON configuration file. I prefer the latter. The default configuration file can be found on Google Code. You'll note the "hubPort" value there. Not shown, but valid, is a "hubHost" configuration item. Just set that to the hostname of the hub.

当您启动您的节点,提供-nodeConfig /path/to/my/node_config.json命令行参数,你会好到哪里去。

When you launch your node, supply the "-nodeConfig /path/to/my/node_config.json" command-line argument and you'll be good to go.

相关推荐
 
精彩推荐
图片推荐