Greetings, I would like to make NUnit execute my unit tests in a random order every time in order to ensure they are isolated and FIRST. Does anyone know of a easy way to do this well without branching NUnit?
A:
My advice is to use IronPython for testing. Write your tests as IronPython scripts, and then randomly call the test function. The other advantage of IronPython is that you can quickly debug things that aren't working; create a few objects, stick 'em together, and make sure they behave as you intend them to. It's really powerful once you get the hang of it.
Mark P Neyer
2009-09-21 14:23:07
I already have over 2000 nUnit tests, so re-writing them is not appealing.
ryber
2009-09-21 14:33:01
A:
Maybe try running your tests with ReSharper? I believe it runs tests in parallel, and in a non-deterministic order, but I'm not 100% sure on that.
mgroves
2009-09-21 14:30:03
+4
A:
There looks to be an nUnit add-in for this: http://www.nablasoft.com/alkampfer/index.php/2008/12/06/randomizer-nunit-addin/
Matt Poush
2009-09-21 14:34:43