I'm using Visual studio (sometimes resharper) to run my unit test.
I heard about NUnit, but I don't know many things about it...
Should I care about it ? Can it offer something better than visual studio?
Should I Use NUnit and why?
I'm using Visual studio (sometimes resharper) to run my unit test.
I heard about NUnit, but I don't know many things about it...
Should I care about it ? Can it offer something better than visual studio?
Should I Use NUnit and why?
NUnit has few advantages over MS-Test
Assert.AreEqual(expected, actual)
vs Assert.That(actual, Is.EqualTo(expected))
[TestCase]
! NUnit allows for parameter-ized tests.From my current perspective (after 8 months of development with about 10 developers on average) I would advise against using MSTest for the following reasons
In other words, if I would have to decide again 8 months ago, I would probably take NUnit. I may not have the integrated test results report, but developers would have a more seamless testing experience.
Here is my experience with MS Test
Addition: We have some more tests now, can't even say how many. It is impossible to run them all anymore from Visual Studio, because of OutOfMemoryExceptions and other instability problems. We run the tests from scripts. It would be easy to view test results in Visual Studio, but when the solution is open, VS crashes (every time). So we need to search the failing tests using text search. There is no advantage of an integrated tool anymore.
Another Update: We are using VS 2013 now. A lot of things changed. They rewrote the MS Test test runner for the third time since we started. This caused a lot of breaking changes, but neither new version was doing anything better. We are glad that we didn't use the fancy features of MS Test, because they are all not supported anymore. It's really a shame. We are still using scripts to build and run all unit tests, because it is handier. Visual Studio required a few minutes to start running tests (time measures after compilation until first test starts). They probably fixes it with an update and this might be a specific problem of our project. However, Resharper is much quicker when running the same tests.
Conclusion: At least in combination with Resharper, MS Test is useful. And I hope that they finally find out how the test runner should be written and won't do this kind of breaking changes when we update Visual Studio next time.
NUnit can be used in combination with visual studio. It is a framework not a separate program. So you could care an see if it suits you :).
"After installing the plugin you'll find a new submenu under the tools menu."
See http://nunitit.codeplex.com/ for more information on importing it.
Also, a lot can be found using the search of SO. This topic lists advantages of NUnit over MS standard testing for instance.
NUnit is a unit testing framework, which is also supported by resharper. I think you are using Microsoft's unit testing framework, so NUnit is just an alternative to Microsoft's product ;)
Here is the link to the homepage of NUnit: http://nunit.org
In NUnit, tests are not executed in parallel. Rather, it appears that all tests execute on a single thread. In MSTest, each test is instantiated on a separate thread, this results the runs being interleaved. Therefore, if test A depends on test B for its success, it likely will fail as test B will likely start running as test A is running.