NUnit – No Test Fixtures
I’m writing some SharePoint code and using NUnit as part of my unit testing strategy.
I was writing some tests for a method that I’d already written (I know, I know it’s not TDD – I think of it as a technique which I term "TAD" Test After Design ;->).
I’d already deployed the code to SP once and I attempted to run the tests using the NUnit GUI. The NUnit Gui reported that my assembly had been built "using no known testing framework". The assembly showed a yellow question mark and when I pressed "Run Tests" the GUI reported that there were no tests to run "Reason: has no test fixtures".
After a bit of Googling which pointed at it being either a NUnit version issue (I’m using the latest version) or a permissions thing related to network drives (which I’m not doing).
Using the VS addin TestDriven.Net I noticed that the GAC version of my assembly was being pulled in and executed rather than the latest version of code in VS. I deleted it from the GAC (after IISReset) and my tests executed fine 🙂
Leave a Reply