Friday, May 18, 2007

NStub: A Unit Test Generator For .NET Assemblies

NStub is a unit test generator for .NET assemblies. You simply point NStub at the assembly containing the types you wish to test, pick the types and methods that your interested in from interface, choose where you want the resulting source files to be created at, and click GO!. That's all there is to it!

What do I get? Your resulting group of source files will contain one stubbed test method for each method that you selected. The code is clean, clearly documented and is already decorated to work with your chosen test framework. All you have to do is fill in the logic. Each group of source files even comes with an associated project allowing you to quickly open the files in Visual Studio and start editing. Not using Visual Studio? No problem! Just open the files individually in your chosen development environment and go to work.

That sounds great...except for... NStub is fully extensible, allowing you to create plug-ins not only to support multiple testing frameworks but also to generate the testing code in any .NET compliant language. The sky is the limit to what you can accomplish.

Download it here: http://code.google.com/p/nstub/downloads/list

No comments: