I have been using VSTSTest on my current project for around 6 months now and I find that it causes a lot of pain and it has a lot of hacky quirks. I'm not the only one the doesn't like it.
I have decided to see how much effort it would take to switch to an MbUnit/NCover combination here at work.
Using ReSharper I first analyze usages of the Microsoft.VisualStudio.TestTools.UnitTesting namespace. 108 usages, it's everywhere! :(
The first step is going to be to change all of the attributes from the VSTS [TestClass] and [TestMethod]. If Microsoft would have named these according to all the other unit testing suites that came before it I could've skipped this step. Here are the attributes I had to change:
The next problem that I came across was that our team had a bunch of tests that were testing private methods. For those that don't know VSTSTest generates a file called VSCodeGenAccessors in your test project when you (sigh) right click on a private method and select Create Private Accessor. MbUnit has the ability to test private methods so I had to change all of the tests that used the private method testing to use the MbUnit equivalent:
Reflector.Invoke(objectUnderTest, "PrivateMethod", "parameters");
Now, I am in a compiling state! I run the tests and they all pass. I am free of the shakles!
Theme design by Jelle Druyts
Pick a theme: BlogXP business calmBlue Candid Blue dasBlog dasblogger DirectionalRedux Discreet Blog Blue Elegante essence Just Html MadsSimple Mobile Mono Movable Radio Blue Movable Radio Heat nautica022 orangeCream Portal Project84 Project84Grass Slate Sound Waves Tricoleur useit.com Voidclass2 BlogXP business calmBlue Candid Blue dasBlog dasblogger DirectionalRedux Discreet Blog Blue Elegante essence Just Html MadsSimple Mobile Mono Movable Radio Blue Movable Radio Heat nautica022 orangeCream Portal Project84 Project84Grass Slate Sound Waves Tricoleur useit.com Voidclass2
Powered by: newtelligence dasBlog 2.0.7226.0
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.
© Copyright 2008, Steven Rockarts
E-mail