Frictionless Testing with TestDriven.NET
But Wait, There's More!
So far, everything I've shown you could be done with any of the major unit testing frameworks, though TestDriven.NET makes it easier by keeping it all under one roof. But TestDriven.NET goes further to provide you with some advanced capabilities as well. For example, if a test fails, it adds an entry to the Visual Studio .NET task list. Double-clicking this entry takes you straight to the failing test. The "Run Test(s)" menu items is also integrated with Solution Explorer, so you can choose to run all the tests in a particular project or class easily.
TestDriven.NET also allows you to choose between in-proc and debugger testing with a simple menu selection. Normally, when you run your tests they just run, and you look to your actual code for problems. But what do you do when you suspect that the test itself might be in error? With TestDriven.NET, you set a breakpoint in the test and choose to run the tests in the debugger, as shown in Figure 3. When the test assembly hits the breakpoint, you can use all the regular debugging tools to figure out what might be wrong. This is possible in other unit testing tools (by attaching the debugger to the external process) but TestDriven.NET makes it a whole lot easier.
About the Author
Mike Gunderloy is the author of over 20 books and numerous articles on development topics, and the lead developer for Larkware. Check out his latest book, Coder to Developer from Sybex. When he's not writing code, Mike putters in the garden on his farm in eastern Washington state.
Page 3 of 3