darrylbraaten.com

Software Development and System Architecture

 

Welcome to darrylbraaten.com Sign in | Join | Help
in Search

Darryl's Homepage

Random Ramblings

Integrated Testing with NUnit; Resharper or TestMatrix

Update: I decided to go with Resharper. It is just a bit slicker then TestMatrix, and I decided the refactoring tools are worth more then the profiling tools in TestMatrix. 

For some reason if you have the Architects version of Visual Studio you are not allowed to write unit tests with Visual Studio.  I guess Microsoft things that Architects shouldn't test the code they write.  On one of my past projects I used both Nunit, and the Microsoft test framework.  The Microsoft framework is not as large as Nunit, but it looks like it does everything that I need.  But because it is currently unavailable to me I am using Nunit for a new project I am starting.  

One thing that I don't like about Nunit is does not have any Visual Studio integration by default. This makes it rather tedious to use.  Previously I have used a free version of JetBrains Resharper to get around this. JetBrains doesn't seem to offer the free version anymore.  Resharper does a bunch of other things in addition to running unit tests, actually unit tests seems to be one of its minor features.  Resharper costs $199.  Looking around the net for other solutions one that came up the most was TestMatrix by ExactMagic, actually what comes up is TestRunner, TestMatrix is the most resent version, it clocks in at $129.

My decision now is between, Resharper a refactoring, best practice enforcing tool, or a dedicated unit testing plugin, that does a little profiling and code coverage.  

Resharper Pros
Full Refactoring tool
Suggests best practices for you to follow
Run individual tests from an icon in the coding window.
Will run tests marked ignore if you explicitly run them.
Resharper Cons
The old version anyway slowed VS down a lot.  Not sure about the new version yet.
Profiling is a $199 add on.

TestMatrix Pros
Code coverage
Profiling is included
Nice visual around tests showing their success or failure.
TestMatrix Cons
Can not manually run tests marked ignore
No in editor icons for running tests

Decisions decisions, resharper is very cool. I like being able to run individual tests even if they are marked ignore. Though this is probably not a best practice, I tend to write utilize these as debug entry points that do something I wouldn't normally do in a test.  TestMatrix has profiling, something I really like, but there are free profilers out there that give pretty good results(Nprof).  

I have a few days on the free trials and will add pros and cons and I find them.  

Published Thursday, July 17, 2008 3:07 PM by darryl
Filed under:

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

No Comments

Leave a Comment

(required) 
(optional)
(required) 
Submit