Well, it can! It only takes a few magic potions and sacrificing a few small animals.
Luckily someone had done this before and blogged about it so I pretty much just had to follow instructions. Hereâ€™s the long and short of it:
- We had to get WatiN, which will be used to create an instance of Internet Explorer that will run our HTML page with the QUnit tests in it.
- We had to get the IterativeTest addin for NUnit. This will create one NUnit test for each QUnit test.
In the code, I added an IterativeTest (a test decorated with the [IterativeTest] attribute) that will run all of the QUnit tests. Since we all use ReSharper and ReSharper doesnâ€™t recognize the [IterativeTest] attribute, I also added a normal NUnit [Test] that will run all of the QUnit tests inside one test and fail if any of the QUnit tests fail. So we should have all of our bases covered.