Tag: selenium grid

Selenium Grid Hub和节点问题

HELPPPP PLEASSEE! 现在我已经使用以下内容设置了selenium网格: -Machine A上有一个集线器和节点(集线器在同一台机器上的节点)。 -Machine B(与集线器不同的机器不一样),上面有2个节点。 因此,我现在有一个集线器和3个节点:1在集线器机器(机器A)上充当节点,2在另一个物理节点机器(机器B)上。 因此,通过此设置,我可以并行AFAIK运行3个测试用例。 我会帮助我所做的一切。 集线器的setup命令: java -jar selenium-server-standalone-3.0.0-beta2.jar -role hub -port 4445 (我更改了默认端口号) 节点的setup命令: java -jar -Dwebdriver.ie.driver =“C:\ Libraries \ IEDriverServer.exe”-Dwebdriver.chrome.driver =“C:\ Libraries \ chromedriver.exe”selenium-server-standalone-3.0.0-beta2.jar -role webdriver -hub http:// HubIP:4445 / grid / register -port 4453 然后是C#中的代码用于设置和测试: using System; using OpenQA.Selenium; using OpenQA.Selenium.Firefox; using OpenQA.Selenium.Chrome; using OpenQA.Selenium.Safari; using OpenQA.Selenium.Edge; […]

Selenium Grid使用C#/ NUnit进行并行测试

我已经用NUnit编写了几个调用selenium命令的unit testing。 我有2个win2k3服务器盒设置,一个运行selenium网格集线器和2个selenium rc。 另一个盒子正在运行5个selenium rc。 所有这些都在集线器中注册为在Windows上运行Firefox(为了保持简单)。 在我的unit testing设置方法中,我已经将它连接到端口4444处的集线器主机名。 运行测试时,它们只按顺序运行(如预期的那样)。 我已经对NUnit的路线图以及它们如何为并行测试能力进行了大量阅读。 在此期间,我已经看到很多关于使用PNUnit的指示。 然而,这似乎完全打败了Selenium Grid的目的。 有没有人使用连接到Selenium Grid设置的C#/ NUnit成功实现了并行测试? 如果是这样,请详细说明。 我现在完全不知道如何使用NUnit,因为它现在存在(我使用的是版本2.9.3)

如何使用Selenium Grid2在一个集线器上运行多个浏览器

我正在进行测试: DesiredCapabilities capability = DesiredCapabilities.Firefox(); IWebDriver driver = new RemoteWebDriver(new Uri(“http://localhost:4444/wd/hub”), capability); ISelenium selenium = new WebDriverBackedSelenium(driver, “http://localhost/”); selenium.Start(); 这将运行Firefox浏览器,在http://localhost:4444/grid/console Web控制台视图中,我可以看到一个Firefox浏览器正在运行。 如何在节点上并行使用多个浏览器? 我正在使用这里找到的Grid2维基页面

如何并行运行NUnit(Selenium Grid)测试?

我当前的项目使用NUnit进行unit testing并驱动用Selenium编写的UAT。 开发人员通常在VS.Net 2003中使用ReSharper的测试运行器运行测试,我们的构建盒通过NAnt将其踢出。 我们希望并行运行UAT测试,以便我们可以利用Selenium Grid / RC,以便它们能够更快地运行。 有没有人对如何实现这一点有任何想法? 和/或针对多个浏览器环境测试Selenium测试而不自动编写重复测试的最佳实践? 谢谢。

Selenium RemoteWebDriver c# – System.InvalidOperationException

我有一个使用Selenium.WebDriver的v3.4.0的示例UI测试项目。 当我针对本地驱动程序运行测试时,一切正常,但我想使用Selenium Grid 2来完成工作。 一旦我尝试实例化一个新的RemoteWebDriver,我就会得到一个细节很少的exception。 Driver = new RemoteWebDriver(new Uri(GridUrl), Capabilities); 注意:GridUrl是“ http:// localhost:4444 / wd / hub ” 使用StackTrace引发System.InvalidOperationException,如下所示: at OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse) at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters) at OpenQA.Selenium.Remote.RemoteWebDriver.StartSession(ICapabilities desiredCapabilities) at OpenQA.Selenium.Remote.RemoteWebDriver..ctor(ICommandExecutor commandExecutor, ICapabilities desiredCapabilities) at OpenQA.Selenium.Remote.RemoteWebDriver..ctor(Uri remoteAddress, ICapabilities desiredCapabilities) at xxxx.Ui.Tests.SeleniumTests.TestInitialize() in C:\Users\xxxx\Documents\Visual Studio 2015\Projects\xxxx.Ui.Tests\xxxx.Tests\PersonTests.cs:line 38 集线器配置 我在本地运行的集线器v3.4.0具有以下配置: { “port”: 4444, “newSessionWaitTimeout”: -1, […]