Possible issue with running selenium tests on one machine concurrently

Go To StackoverFlow.com

1

I have multiple similar sites (same layout, just different data), and each of them has drop down menu on mouse over (and disappears on mouse out).

I am using Selenium 2 and WebDriver, and I have one selenium test case that basically do the mouse over and make sure each of the link in the drop down menu works.

I am using selenium grid, so I have a hub and few test machines.

Because I have many sites (few hundred) to test, so I am thinking of making each machine to run the test case against multiple sites in parallel.

My concern is because there can be only one active browser at a time, will it cause issue if web driver tries to perform Action.moveToElement() on multiple browsers at roughly the same time? Will only the active browser performs Action.moveToElement() properly and other browsers fail? If there will be an issue, is there any workaround?

2012-04-04 03:21
by Alvin
Tried it, decreased the passed tests from 100% to about 67% when running three tests on a machine. Not good =/ - Petr Janeček 2012-04-05 21:27
@Slanec, you should put that as an answer - Alvin 2012-04-06 01:18
I was hoping for someone to show up with a good workaround, too : - Petr Janeček 2012-04-06 02:30


1

I have tried it using JUnitCore.runClasses(ParallelComputer.classes(), SomeClass1.class, SomeClass2.class, SomeClass3.class);, it decreased the passed tests percentage from 100% to about 67% when running three tests on a machine. Not good =/.

The good part - firefox actually can do it in parallel. If the FF instances are delayed between each other so they don't do the same thing at the same time, it works better. Some of the failures happened during a Firefox bootup - so if you can minimize closing and opening windows, do it. But still, sometimes it just fails for no reason.

If you really would use the saved time, then go for it, log all failed tests and run them again after the first round - this time one at a time.

2012-04-06 02:29
by Petr Janeček


0

You could also solve this, depending on your ultimate goal of testing, by not using the Action class with the mouse-movement click, but instead use the WebDriver findBy-click method or Javascript executor method. It would probably be less contentious when running multiple windows at the same time. If the Action class, when defining a mouse movement, uses native calls at all, such as "move to Point", then one browser over the top of another, then I would guess it's possible that the movement point could be masked by another window. I am really not sure about this, just giving you another idea to try.

2013-02-20 17:34
by djangofan
Ads