Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>If it just a simple application, the MSTest framework built into VS2008 should tick all the boxes. It is not the same as NUnit, though a lot of people (mistakenly) refer to it as if they were the same thing. </p> <p>I have never used it for mocking, so maybe someone else can elaborate on that. It generates a separate project in your solution that is just for the purpose of testing. <a href="http://www.geekzone.co.nz/vs2008/4819" rel="nofollow noreferrer">This is a good explanation of how to use it.</a></p> <p><img src="https://www.geekzone.co.nz/images/blog/vs2008/unittesting/09.jpg" alt="alt text"></p> <p><strong>Edit:</strong> Doing a bit more digging, I came across <a href="http://www.c-sharpcorner.com/UploadFile/satisharveti/VS2008UnitTesting08132008055534AM/VS2008UnitTesting.aspx" rel="nofollow noreferrer">this comparison</a> of MSTest and NUnit.</p> <p><strong>Drawbacks of NUnit Framework:</strong></p> <ul> <li>Installation of NUnit comes in a separate MSI.</li> <li>No Integration with Visual Studio.</li> <li>Requires writing test cases manually. </li> <li>No auto generation of code.</li> <li>Requires opening separate window (NUnit Console or GUI) to execute test cases.</li> <li>Ordering of test cases execution not available.</li> <li>No inbuilt feature to debug test cases.</li> <li>No inbuilt feature to enable/disable test cases.</li> <li>No inbuilt feature to give additional information of test cases like stack trace, Trace Information etc.</li> <li>No inbuilt feature to sort test cases based on Computer Name, Class Name and Host Type etc.</li> </ul> <p>That's from the comparison article I linked to.</p> <p>I have never used NUnit, only MSTest for C# and JUnit for Java, so I am kind of biased in that respect. MSTest has always worked really well for me <strong>for WinForms</strong>, with features like being able to run the tests individually, show really detailed reports (with individual trace logs) and autogenerate all the boilerplate test code and do all those kind of things that make VS2008 such a brilliant IDE. By the sounds of it, NUnit has worked well for others and they have their reasons why they like it.</p> <p>Unless you have a particular reason to take the NUnit/Testdriven.NET approach, like you need a certain feature, or you just prefer that way of setting up tests and trying to integrate it back into VS, then I don't see any reason not to just use MSTest which works right out of the box. </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload