3

I would like to have information on the available unit testing frameworks in .NET realm. Especially the ones which are suitable for ASP.NET (C# .NET 3.5).

Your comments and suggestions would be much appreciated.

Viren Pushpanayagam
  • 2,397
  • 6
  • 35
  • 39
Thurein
  • 2,536
  • 7
  • 34
  • 49

3 Answers3

2

It depends on how you define "Best". There are various elements that a unit testing framework need to support and the choice generally lies in developer friendlyness.. I used NUnit/MSTest both in past and I like NUnit because it not only supports various mocking frameworks like NMock, RhinoMock, MoQ etc.. it also makes the life easier where you can directly run the unit tests from NUnit UI without opening the VS interface.

If you are using VS2008, then also you can use MSTest or NUnit....

Steven
  • 166,672
  • 24
  • 332
  • 435
sajoshi
  • 2,733
  • 1
  • 18
  • 22
  • .. In fact, I am using VS2008 TS. Do you think that MSTest has advantages because of built-in integration with VS and future-proof as well? I have read a few articles but I am still in a dilemma over which one to choose. I do understand that NUnit is a veteran. – Thurein Mar 21 '11 at 16:06
  • MSTest has advantages of builtin integration. In my current project I am using MSTest and I have issues with CC.NET integration where I always find the process hanging when the CI build triggers and one of my action executes the MSTests. However - with NUnit I never found this case. – sajoshi Mar 28 '11 at 03:39
1

Visual Studios 2010 has a unit testing feature set with all kinds of fancy stuff.

user623879
  • 4,066
  • 9
  • 38
  • 53
  • 1
    @Kyaw: If you're using VS2008 professional. Go for MSTest (integrated in VS). I never needed anything more than MSTest. – Steven Mar 21 '11 at 08:52
0

See this discussion I have great experience with a NUnit+RhinoMocks+Resharper combo.

Community
  • 1
  • 1
Morten
  • 3,778
  • 2
  • 25
  • 45