How to run NUnit tests in parallel

nunit

I've got a large acceptance test (~10 seconds per test) test suite written using NUnit. I would like to make use of the fact that my machines are all multiple core boxes. Ideally, I'd be able to have one test running per core, independently of other tests.

There is PNUnit, but it's designed for testing for threading synchronization issues and things like that, and I didn't see an obvious way to accomplish this.

Is there a switch/tool/option I can use to run the tests in parallel?

Best Answer

If you want to run NUnit tests in parallel, there are at least 2 options:

  • NCrunch offers it out of the box (without changing anything, but is a commercial product)
  • NUnit 3 offers a Parallelizable attribute, which can be used to denote which tests can be run in parallel
Related Topic