1

We are using VS Community 2015 and have the choice of developing under the MSTest or the NUnit framework. We are building a testing framework using Legitest (unit, integration, system, etc) for database testing (including ETL, OLAP and Reporting).

I have seen mentions of 'limitations of MSTest' but for the above testing types what are the advantages of using NUnit over MSTest?

  • 1
    Check out the answer to this question over at SO. I use NUnit with Bamboo because of the plugins that run the tests and then parse the results. And technically VSTest replaced MSTest in 2012, but has been kept around for backwards compatibility. – kirbycope Apr 6 '17 at 18:31
  • 1
    @kirbycope I think that should be an answer, you can copy paste the main points and reference the link for more detailed reading, but it's a pretty solid answer. – mutt Apr 6 '17 at 19:10
  • Indeed @kirbycope. Certainly helpful and wasnt aware of VSTest – Marcus D Apr 7 '17 at 5:48
  • Per your suggestions I have copied relevant info into an answer. – kirbycope Apr 7 '17 at 19:14
2

Check out the answer to this question over at StackOverflow.

(From the accepted answer) NUnit has few advantages over MS-Test

  1. Suite attribute - can aggregate tests and execute them separately (useful for large projects with fast and slow tests for example)
  2. Readable Assert method, e.g. Assert.AreEqual(expected, actual) vs Assert.That(actual, Is.EqualTo(expected))
  3. NUnit has frequent version updates - MS-Test has only one per VS version.
  4. Many integrated runners including Resharper and TestDriven.NET
  5. Expected exception message assertion - can be done using attribute in NUnit but must be done using Try-Catch in MS-Test
  6. [TestCase]! NUnit allows for parameter-ized tests.

I use NUnit with Bamboo because of the plugins that run the tests and then parse the results. And technically VSTest replaced MSTest in 2012, but has been kept around for backwards compatibility.

You can use the VSTest.Console.exe program to run automated unit and coded UI tests from a command line. VSTest.Console.exe is optimized for performance and is used in place of MSTest.exe in Visual Studio 2012.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.