0

I heard there is built-in tool in VS2010 for unit test for C#. I am using .Net 4.0 + C#. Any tutorial recommended for such built-in tool for a beginner? What is the pros and cons of such tool compared to NUnit?

1 Answer 1

2

Here a links comparing MsTest and NUnit: http://weblogs.asp.net/rosherove/archive/2010/03/05/nunit-vs-mstest-nunit-wins-for-unit-testing.aspx http://it-tutorials.us/software/2320.aspx

In terms of functionality, both provide comparable features, especially for a beginner. I think the biggest difference between the two tools is that one is free and one is not. MsTest is a commercial tool and is not usually included with all versions of Visual Studio. On the other hand, NUnit is free and can be used with any IDE. Another thing to consider is that almost all build servers have NUnit integration to not only run NUnit tests, but also process the generated XML reports.

Sign up to request clarification or add additional context in comments.

5 Comments

"also process the generated XML reports" -- what report do you mean? Could you show me a sample or any published document? Thanks.
NUnit generates can generate an XML document that specifies statistics about the test execution. The report typically contains the number of tests, the number of passed versus failed tests. Typically, the file is generated in XML and then the build server (Cruise Control, Team City, etc) pick up the XML file and import the results. Then they display the results as part of the build detail in their GUI.
Thanks Matthew, and MSTest does not provide such XML outputs which could be easily parsed?
It does provide outputs (not sure on format at the moment), but I've found that some build servers do not have built-in support for Microsoft's format. NUnit is widely supported and would work out of the box with most build servers (TFS probably being an exception).
Thanks for your advice, Matthew! Question answered!

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.