views:

137

answers:

2

Hey guys, I'm pretty new to Unit Testing so bear with me.

I realize that best best practice is not to auto generate unit tests, however I'd like to use Code Generation to set-up the basic skeleton of the tests.

Now, I know Visual Studio 2008 already has the built in "create tests", however, it just creates a flat list of all the classes it's going to test... and it's not for NUnit right?

Ideally, I'd like the code generation to follow the folder AND namespace structure of the assembly its generating tests for.

Can you guys recommend any good tools which generate NUnit unit tests for .NET assemblies in Visual Studio 2008?

cheers!

+2  A: 

Try Pex, although it's beta and has a steep learning curve. This article might help.

HeavyWave
cool, having a look now... but is it just VS2010?
andy
I'm using it from VS2008
HeavyWave
Thanks HeavyWave, been looking at Pex, looks great
andy
Pex is not free, you have to be an MSDN subscriber to use it legally.
Piotr Owsiak
+1  A: 

There is quite a list:

  1. NStub
  2. TestGen.Net
  3. NunitGenAddIn
  4. ($$)KellerMan NUnit Test Generator
  5. Pex
  6. MSTest - fair enough this is not NUnit, but it does generate tests and should be "considered"
Lucas B