Parallel testing with Selenium Grid (using C# unit tests)
-
27-09-2019 - |
문제
Following AutomatedTesters response: Is there any way to run parrallel tests with C# code, without using class libraries other than the Selenium Core?
I have the following setup:
Selenium Grid Hub: 192.168.0.1 Selenium RC 1 : 192.168.0.2 Selenium RC 2 : 192.168.0.3
Both remote controls are running *firefox. If only 1 of the remote controls is running, when I send a test to the hub it loads and runs fine. However if BOTH remote controls are running - the test only runs on one of them.
I was expecting that this:-
selenium = new DefaultSelenium("192.168.0.1", 4444, "*firefox", "http://blah.com/");
selenium.Start();
// rest of test follows...
would fire up BOTH remote controls at the same time?
Any ideas why this isn't happening?
Many thanks!
해결책 2
I've been having a look around and I think the answer for me is Gallio and it's test runners
다른 팁
Unfortunately doing that will never have 2 Selenium instances running. Each Selenium object will control a browser and each browser will be started from 1 RC connected to an RC.
If you want to have it running multiple browsers in parallel you will need to run your tests with something like PNunit or MBunits Parallelizable.