I am usign C#, with Gallio/mbUnit to write a very simple set of tests that open a browser, navigate to google.com, type 'seleniumhq' in the search box, and click the search button.
I create my host with:
java -jar \"C:\\selenium-server-standalone-2.15.0.jar\" -role hub -port 4444
and my node with:
java -jar \"C:\selenium-server-standalone-2.15.0.jar\" -role node -hub http://[hostIP]:4444/grid/register -port 5556 -browser browserName=htmlunit,platform=ANY,version=firefox,maxInstances=1
I create my webDriver instance, I use:
driver = new RemoteWebDriver("http://localhost:4444/wd/hub", DesiredCapabilities.HtmlUnitWithJavaScript());
I am monitoring my node machine and when the test commences, the CPU pegs to 99% with just 1 test running. I get timeouts when waiting for the search button to display... it's there, just not visible, even after 40 seconds:
var wait = new WebDriverWait(WebDriver, new TimeSpan(0, 0, 0, 40));
wait.Until(m => m.FindElement(By.Name("btnG")).Displayed);
Any thoughts on why that element isn't visible for HtmlUnit consistently?
Any thoughts on why the CPU pegs at or near 100% and spikes in memory up to 800,000K for HtmlUnit on a remote node?
I have the copied the same test to create 10 identical tests and if I remove the click search button code, the HtmlUnit tests take 65 seconds. This test is using two nodes, DegreeOfParallelism set at 10, and MaxInstances set at 5 for each node. When I run the same tests with the same paramters with Chrome, they run in 35 seconds and I don't see the CPU going crazy. Anybody have any ideas on this? HtmlUnit is supposed to be about 4x's as fast from what I have read. I am guessing that I have something wrong that should be fairly obvious.
Thanks for all help and suggestions.