views:

1152

answers:

3

I'm new to both unit testing and Visual Studio 2010 (just upgraded from 2008). I'm interested in using VS2010's new built-in unit testing tools, but would like to get the lay of the land first. I haven't been able to find any resources or tutorials on unit testing with VS2010 specifically - has anyone found a good walk-through?

I'm also open to persuasion that we should stick with NUnit or the like, if anyone knows a reason to avoid the built-in tools.

+1  A: 

Here's a Channel9 video titled "TestDriven Development with Visual Studio 2010".

She goes through the basics of the Test Project, and it seems a good intro, Channel9-style!

Aside: This is vintage 2008 material, and the GUI of Visual Studio doesn't look like RTM. You can see though, when she selects text, that it appears to highlight ala 2010.

p.campbell
+2  A: 

PEX and PEX Tutorial

CodeToGlory
PEX is good for white box unit testing but may not be viable for some projects as it's under Microsoft Research Licence which specifically states non Commercial use :( - http://research.microsoft.com/en-us/projects/pex/license.aspx
Russ Cam
Not true. You can use it commercially. It is now officially a power toy and is covered under this license --> http://research.microsoft.com/en-us/projects/pex/rtwpowertool.rtf
CodeToGlory
+1  A: 

I prefer using open source tools such as NUnit, the reason is, if you use the built-in testing tools in your projects, those will not be available to developers running express versions of Visual Studio. This might not be a good enough reason for you but it is for me, specially when you work with .NET open source projects.

Good luck!

Ricardo