Selenium Grid with parallel testing using C#/NUnit

seth picture seth · Nov 18, 2009 · Viewed 9.6k times · Source

I've got several unit tests written with NUnit that are calling selenium commands. I've got 2 win2k3 server boxes setup, one is running selenium grid hub along with 2 selenium rc's. The other box is running 5 selenium rc's. All of them are registered with the hub as running Firefox on Windows (to keep it simple). In my unit test setup method I've got it connected to the hub's hostname at port 4444.

When running the tests, they only run sequentially (as expected). I've done a lot of reading on NUnit's roadmap and how they are shooting for parallel testing abilities. I've seen lots of pointers to using PNUnit in the meantime. However this seems to completely defeat the purpose of the Selenium Grid.

Have any of you successfully implemented parallel testing using C#/NUnit connected to a Selenium Grid setup? If so, please elaborate.

I'm at a complete loss at how this will/can work using NUnit as it exists now (I'm using version 2.9.3)

Answer

Yauheni Sivukha picture Yauheni Sivukha · Dec 23, 2009

Unfortunately NUnit can not run tests in parallel, so you have to use another runner to archive all advantages of parallel testing with Selenium Grid.

I using Gallio runner for my tests on c# and have examples here:

project on c# with tests runned in parallel: http://code.google.com/p/design-of-selenium-tests-for-asp-net/

description: http://slmoloch.blogspot.com/2009/12/design-of-selenium-tests-for-aspnet_19.html

Gallio test runner: http://www.gallio.org/