Is there a free Visual Studio addin for Nunit?

2019-01-10 06:37发布

问题:

I'm cheap and don't want to pay for ReSharper or TestDriven.NET, is there a free visual Studio addin for NUnit?

回答1:

You can create a blank project (Choose console application for example) and in the property of the project you can select DEBUG tag and select "Start External Program". Put the path of Nunit. Than, in the start option, the command line arguments select the DLL that contain all your test (mine is always in the nunit\bin...). Than select "enable unmanaged code debugging" and you will be able to start the projet inside VS and even use the debugger step-by-step.

This is a free solution.



回答2:

Now you can use Gallio: it's open source. www.gallio.org



回答3:

By the way TestDriven can be downloaded for free if it's for personal use or Open Source project.

I had to find a way to use .Net Reflector inside VS few days ago and when I downloaded TestDriven it cames with. Never got any popup asking me to paid.



回答4:

NUnit actually ships with a basic integrated runner. It's not very good, and not very publicized, but unless Charlie has taken it out, it should be in the source.



回答5:

I know this is an old question but another way to do this is to add an external tool from the tools menu to run nunit - set the arguments to be $(TargetName)$(TargetExt) and initial directory to $(ProjectDir)\bin\Debug

check out this link



回答6:

This is an old question and things have changed since the answer was accepted.


You may try NCrunch to run tests automatically or manually.



回答7:

If you're running Visual Studio 2012, there is a plugin written by Charlie Poole, one of the NUnit contributers, that makes use of the new Visual Studio Unit testing plugins.

  • Download VsTestAdapater - it's also in the extension manager.

Unfortunately it doesn't have much grouping options yet, either by run/not run - so you can't group by class, solution and so on. It also doesn't show you any stacktrace if a test fails, just a simple green tick or red box and a message.



回答8:

I haven't used it, but NUnitit is a free Visual Studio Add-in for NUnit.

http://nunitit.codeplex.com

From my experience, the best add-in for visual studio is resharper. TestDriven.Net is also good for unit tests. Hope that helps



回答9:

Also found this one : http://visualstudiogallery.msdn.microsoft.com/c8164c71-0836-4471-80ce-633383031099
It is able to launch your tests in debugger, however you need to recompile the code manually each time you change something - no auto run-build integration