I'v never done unit testing before, but now I am willing to give it a try.
What framework is best for starters? Pros and Cons
what should i read before i begin any coding? Books/Articles/Code/Blogs
is there any opensource "sample projects"?
I will be usign it with asp.net mvc/C#.
The view engines used in the ASP.NET MVC 3 and MVC 4 frameworks are Razor and the Web Forms. Both view engines are part of the MVC 3 framework. By default, the view engine in the MVC framework uses Razor .
If you have integrated Unit Testing in Visual Studio (I think it's part of Professional and better), start with that, because it's integrated. Downside is that to my knowledge, there is no test runner outside of Visual Studio or the Team Foundation Server which disqualifies it for automated testing, but I am not sure how current that information is.
Other alternatives are xUnit.net, NUnit and mbUnit. I can't really talk about the pros/cons due to lack of experience, but I use xUnit.net now because a) I know that there is a working ASP.net MVC Template since Version 1.1 and b) Assert.Throws is just sexy. I use the free personal version of TestDriven.net as my Test Runner within Visual Studio.
There is a "How to get started" Guide for xUnit: http://www.codeplex.com/xunit/Wiki/View.aspx?title=HowToUse
Again, I can't really compare them due to lack of experience with NUnit and mbUnit, but I believe that all three are quite stable and usable.
Rob Conery has created a serie of videos showing how to create an eCommerce app using MVC. He's using a complete testdriven approach (using the built-in test framework in visual studio 2008)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With