<p>I'm looking to introduce a unit testing framework into the mix at my job.  We're using Visual Studio 2005 (though we may be moving to 2008 within the next six months) and work primarily in C#. If the framework has some kind of IDE integration that would be best, but I'm open to frameworks that don't have integration but are still relatively simple to get set up.  I'm going to get resistance to it one way or another, so if I can make sure what I'm pushing isn't a pain in the neck, that would help my case.</p>
<p>The obvious choice from the research I've done so far points to NUnit, but I'd like to get the impressions of someone who's actually used it before recommending it to my team.</p>
<p>Has anyone out there used <a href="https://en.wikipedia.org/wiki/NUnit" rel="nofollow noreferrer">NUnit</a>? If so, are there any pitfalls or limitations of which I should be aware? Are there other good options out there? If so, if you've used both NUnit at that, I'd greatly appreciate an idea of the strengths and weaknesses of them.</p>

[{'answer_id': 712, 'author': 'Michael Stum', 'author_id': 91, 'author_profile': 'https://Stackoverflow.com/users/91', 'pm_score': 4, 'selected': False, 'text': '<p>Scott Hanselman had a good <em>podcast</em> about this, entitled:</p>\n<blockquote>\n<p>&quot;The Past, Present and Future of .NET Unit Testing Frameworks&quot;</p>\n</blockquote>\n<p>:</p>\n<p><a href="http://www.hanselminutes.com/default.aspx?showID=130" rel="nofollow noreferrer">Hanselminutes #112</a></p>\n'}, {'answer_id': 713, 'author': 'Karl Seguin', 'author_id': 34, 'author_profile': 'https://Stackoverflow.com/users/34', 'pm_score': 6, 'selected': True, 'text': '<p>I think <a href="https://en.wikipedia.org/wiki/NUnit" rel="nofollow noreferrer">NUnit</a> <strong>is</strong> your best bet. With <a href="https://testdriven.net/" rel="nofollow noreferrer">TestDriven.NET</a>, you get great integration within Visual\xa0Studio. (ReSharper also has a unit test runner if you\'re using it). NUnit is simple to use and follows an established paradigm. You\'ll also find plenty of projects, tutorials, and guides using it which always helps.</p>\n<p>Your other main choice is probably <a href="https://en.wikipedia.org/wiki/List_of_unit_testing_frameworks#.NET_programming_languages" rel="nofollow noreferrer">MbUnit</a>, which is more and more positioning itself as the <a href="https://en.wikipedia.org/wiki/Behavior-driven_development" rel="nofollow noreferrer">BDD</a> framework of choice (in conjunction with <a href="http://www.gallio.org" rel="nofollow noreferrer">Gallio</a>).</p>\n'}, {'answer_id': 718, 'author': 'denny', 'author_id': 27, 'author_profile': 'https://Stackoverflow.com/users/27', 'pm_score': 3, 'selected': False, 'text': "<p>Visual Studio 2008 has a built-in test project type that works in a similar way to NUnit, but obviously has much tighter integration with Visual Studio (can run on every build and shows the results in a similar way to the conversion results page when upgrading solution files), but it is obviously not as mature as NUnit as it's pretty new and I'm not sure about how it handles mocking.</p>\n<p>But it would be worth looking into when your team moves to Visual\xa0Studio\xa02008.</p>\n"}, {'answer_id': 798, 'author': 'Dan', 'author_id': 230, 'author_profile': 'https://Stackoverflow.com/users/230', 'pm_score': 2, 'selected': False, 'text': '<p><a href="https://en.wikipedia.org/wiki/List_of_unit_testing_frameworks#.NET_programming_languages" rel="nofollow noreferrer">MbUnit</a> is worth a look. It has a set of features comparable to NUnit. It has its own GUI, or can be integrated into Visual\xa0Studio if you have <a href="https://en.wikipedia.org/wiki/JetBrains#ReSharper_Ultimate" rel="nofollow noreferrer">ReSharper</a>. I would also recommend <em>Rhino Mocks</em> if you are doing any sort of <a href="https://en.wikipedia.org/wiki/Test-driven_development" rel="nofollow noreferrer">TDD</a>.</p>\n'}, {'answer_id': 4290, 'author': 'Kevin Sheffield', 'author_id': 590, 'author_profile': 'https://Stackoverflow.com/users/590', 'pm_score': 2, 'selected': False, 'text': '<p>I would say <a href="https://en.wikipedia.org/wiki/List_of_unit_testing_frameworks#.NET_programming_languages" rel="nofollow noreferrer">MbUnit</a> also. I like being able to run a single test many times just by specifying inputs and the result is right above the test function. It is a horrible description of what I mean, so <a href="http://www.hanselman.com/blog/MbUnitUnitTestingOnCrack.aspx" rel="nofollow noreferrer">here is a link that shows you what I mean</a>.</p>\n'}, {'answer_id': 71134, 'author': 'capgpilk', 'author_id': 11707, 'author_profile': 'https://Stackoverflow.com/users/11707', 'pm_score': 3, 'selected': False, 'text': '<p>When I started unit testing, I started with NUnit as it is simple to set up and use. Currently I am using the built-in test runner that comes with <a href="https://en.wikipedia.org/wiki/JetBrains#ReSharper_Ultimate" rel="nofollow noreferrer">ReSharper</a>. That way, I can easily flip between code and test results.</p>\n<p>Incidentally, NUnit detects when you have compiled your code, so you do not need to do any refresh in NUnit. ReSharper automatically does a build when you choose to run a specific test.</p>\n'}, {'answer_id': 71142, 'author': 'Chris James', 'author_id': 3193, 'author_profile': 'https://Stackoverflow.com/users/3193', 'pm_score': 3, 'selected': False, 'text': '<p>The built-in unit testing in Visual\xa0Studio\xa02008 is all right, but its difficult to integrate with <a href="https://en.wikipedia.org/wiki/CruiseControl" rel="nofollow noreferrer">CruiseControl.NET</a>, certainly a lot harder than normal NUnit.</p>\n<p>So go with NUnit if you plan to have nice automated tests.</p>\n'}, {'answer_id': 157451, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 3, 'selected': False, 'text': '<p>We\'ve been using <a href="https://en.wikipedia.org/wiki/XUnit.net" rel="nofollow noreferrer">xUnit.net</a>. It seems to combine all the best of NUnit, <a href="https://en.wikipedia.org/wiki/List_of_unit_testing_frameworks#.NET_programming_languages" rel="nofollow noreferrer">MbUnit</a>, and <a href="https://en.wikipedia.org/wiki/Visual_Studio_Unit_Testing_Framework" rel="nofollow noreferrer">MSTest</a>.</p>\n'}, {'answer_id': 763178, 'author': 'Yordan Georgiev', 'author_id': 65706, 'author_profile': 'https://Stackoverflow.com/users/65706', 'pm_score': 3, 'selected': False, 'text': '<p>Try also the <a href="http://research.microsoft.com/en-us/projects/Pex/" rel="nofollow noreferrer">PEX</a> tool.</p>\n<p>It\'s Microsoft\'s own, probably soon to be integrated into <a href="https://visualstudio.microsoft.com/team-services/" rel="nofollow noreferrer">VSTS</a>.\nIt does support NUnit, <a href="https://en.wikipedia.org/wiki/List_of_unit_testing_frameworks#.NET_programming_languages" rel="nofollow noreferrer">MbUnit</a> and <a href="https://en.wikipedia.org/wiki/XUnit.net" rel="nofollow noreferrer">xUnit.net</a>.</p>\n<p>I also use a small console application for testing one class or a small library. You could copy paste the code from <a href="http://ysgitdiary.blogspot.com/2009/04/example-console-application-in-c-ready.html" rel="nofollow noreferrer">here</a>.</p>\n'}, {'answer_id': 6164060, 'author': 'Siva', 'author_id': 656766, 'author_profile': 'https://Stackoverflow.com/users/656766', 'pm_score': 3, 'selected': False, 'text': '<p>VSTT 2010 (Visual Studio Team System Test) should be a good bet if you are looking for functional test automation. Web services testing, UI testing, <a href="https://en.wikipedia.org/wiki/Microsoft_BizTalk_Server" rel="nofollow noreferrer">BizTalk</a> testing and data-driven testing support. Please look at <a href="https://learn.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2008/ee338734(v=vs.90)" rel="nofollow noreferrer">VSTT</a>.</p>\n'}]
['https://Stackoverflow.com/questions/709', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/111/']