I have used a bit of MS VS2008 integrated Unit Testing framework for writing unit test, but not that extensive, any suggestions which framework will work best for web based applications developed using ASP.NET.
I use the VS integrated framework with an MVP pattern. The web tests of vs works fine for me.
Pretty much any framework will work for you so long as you have some separation of concerns such that your asp.net code is testable. There is a comparison matrix here:
http://xunit.codeplex.com/wikipage?title=Comparisons&referringTitle=Home
probably a bit xunit biased. I actually really like xunit after having used it on the subsonic project. You can get tight visual studio integration using testdriven.net
If you're looking to do functional testing then look at End-to-End application testing from a users standpoint
For web tests I use Selenium, and then for testing the "backend" I will use nUnit/MbUnit. Selenium allows you to either record scripts via a browser plugin or create the tests as a set of methods much the same as standard nUnit unit tests with some specific syntax for driving selenium.
Selenium - Tutorials and downloads
I've played with Telerik's new WebUITest studio and it does look pretty slick for UI testing. However, it is very expensive and Selenium is pretty attractive for free. If you are in a large organization with a distinct QA group doing testing then I'd check out Telerik. Otherwise, Selenium.
BTW: I have to second stimmms' point about having a proper separation of concerns for your application unit testing - it makes all the difference.
MS's unit testing framework is not far from being a direct copy of NUnit 2.2 - semantic differences only. NUnit has probably had more support since then, so I'd give it a small edge. But only a small one.
精彩评论