views:

68

answers:

3

i want to start writing unit tests for my project, what add ons if needed should i install, what abilities do i get by default?

+1  A: 

For start - use built-in MsTest and grab a mocking framework (Moq should do the trick).

Arnis L.
+1  A: 

I highly recommend NUnit, even over Visual Studio's built in tests.

Here are some more references:

NUnit vs. MSTest

NUnit vs Visual Studio 2008’s Test Projects for Unit Testing?

NUnit vs. MbUnit vs. MSTest vs. xUnit.net

More importantly, manage your expectations and understand where these tests make sense and where they don't. It'll help keep you from getting discouraged as you're getting started. Searching Stack Overflow for unit testing and/or TDD will give you lots of food for thought.

Bruce McGee
use testdriven.net?
Chen Kinnrot
I haven't used TestDriven.Net. It seems to make running specific tests easier in the Visual Studio IDE, which sounds like it would make TDD (hence the name) quicker, so I guess it's worth a look. Aside from TDD, almost all of the rest of my unit tests are run outside of the IDE as part of an automated build. Remember, your tests aren't thrown away. They're an important part of your project(s) going forward.
Bruce McGee
A: 

I also would second nunit.

For me though it was not really a choice. Right now I got a copy of VS2008 free from my school but I am planning to start building applications that would be considered commercial so I would have to buy a copy of VS2008 Pro or higher.

So I will be using VS2008 express that does not get the unit testing so for me I rather stick with nunit that is very good and save the hundreds of dollars of not having to buy Pro since most of the features in Pro I probably would never use.

Plus alot of the unit testing books that I seen all use nunit.

chobo2