NUnit Test Adapter

Free

NUnit adapter for integrated test execution under Visual Studio 2012 (all updates),and Visual Studio 2013 (all updates). Compatible with NUnit 2.0 through 2.6.3.

(28) Review
Visual Studio
2013, 2012
Download (160,207)
7/5/2014
1.1.0.0
View
E-mail Twitter del.icio.us Digg Facebook
Add to favorites
Description
Reviews (28)
Q and A (44)
Sign in to write a review
Sort by:

by rmatsick | Fri 4:55 PM

Version 1.1.0.0 is broken! Do not update from version 1.0.0.0! I was helping someone with their new VS2013 installation when the only NUnit Adapter version available in the extensions was 1.1.0.0. He tried running our most recent project which worked under 1.0.0.0 and it complains about the "executor" not being found. I wanted to isolate the problem between his installation and mine found that my NUnit Adapter extension was requesting an update. I AM VERY SORRY THAT I DID THIS. As mine is broken exactly the same as his. I cannot run any tests using this adapter now. I read the bug reports and it appears everyone is having the same problem. I tried to roll mine back to version 1.0.0.0 but there is no way to do this! NO JOY

by Jakub Keller | June 04 2014

I love this tool. Great start to something that can be a very formidable competitor to ReSharper's nUnit extension. Keep up the good work!

by Dima_Limon | February 17 2014

I totally agree with Barbara Nolmans Post below.

by Barbara Nolmans Post | December 10 2013

It works well but Test Explorer window presentation list is somewhat poor for me : I have many tests, and many test classes have a common base class. Some methods have the same name in several test classes.

So I have a display problem : when sorting by class, I see tests classes base class listed many times, then real classe listed, since they have a common base class the base class is listed every time.

When sorting by project, I see all homonyms methods one aside another. I see which file/class is concerned at bottom if I select an item.

I guess I have to complain to MS or maybe can you do something in your adapter to :
a. fix class listing? (don't repeat base class in listing but list it once)
b. see whether sorted by project items can display both test class and method names?

Thank you

by karl140.6 | October 11 2013

Thank you very much for this tool. All the VS 2013RC tools worked perfectly with Nunit.

Best,

Karl

by Tomasz Kajetan Stańczak | October 03 2013

great tool - gives you the in-VS test runner and code coverage for NUnit!

by steveculshaw | September 18 2013

Great to have access to NUnit tests in VS

by Samuel Kupferschmid | September 04 2013

by Alex Pearlstein | August 27 2013

Has made my life much easier thus far, I hated to have to run the tests in a separate application.

by Mark Rucker | July 20 2013

Thanks for integrating a great tool into VS.

by Mike L Watkins | July 18 2013

Great plug in. I love being able to create test playlists now and isolate the tests to run to what I am working on. It seems a little slow to start up the tests but all the other aspects of this plugin make it well worth while.

Thanks for writing this!

by barisdemir | May 29 2013

Newer update on May 29th;
The bug has been fixed with 0.95.1.1 version and everything works fine (you may need to uninstall and re-install the package)
Quick turnaround.
Thanks everyone, great extension to visual studio.

Update;
The bug seems to be opened by others and a fix is on the way.
Check the link below;
https://bugs.launchpad.net/nunit-vs-adapter/+bug/1184231



Hello,
I was very happy with the adapter but when I upgraded this morning (May 28th) to the beta 0.95 version, I can NO LONGER DEBUG the tests.

I have the following version for Visual Studio.
Thanks for this great tool but is there a way to rollback to previous version until this issue is resolved.
Sincerely,
Baris Demir

Microsoft Visual Studio Premium 2012
Version 11.0.60315.01 Update 2
Microsoft .NET Framework
Version 4.5.50709

Installed Version: Premium

by skonthebass | May 28 2013

Upon updating (Beta 5)I'm experiencing the problems mentioned; tests run and immediately end, tests don't actually execute. Need to roll back

by RKreissl | May 28 2013

I'm unable to debug unit tests. They run fine without debugger. I'm using VS Ultimate 2012 Update 2.

by Chris Westermann | May 27 2013

After installing this I can no longer debug a unit test. Starts up and then ends immediately.

by jroney | April 04 2013

I've had no problems in 3 months of usage. It's fantastic to be able to run NUnit tests from within VS.

by Willberforce | March 11 2013

Currently buggy - causes VS2012 to crash a lot and after running a few hundred tests VS becomes very unresponsive.

Charlie Poole (NUnit) March 12 2013
| Edit |
Delete

Those aren't bugs until you report them as such!!!

Seriously, don't assume we know about problems. They may not be as general as you imagine. Of course, you'll need to be fairly specific in a bug report.

by Dima Vorotyntsev | March 10 2013

by HockeyJ | February 05 2013

Ace for running and debugging.

by Rayudu Addagarla | January 07 2013

Will this support VS 2010?

Charlie Poole (NUnit) March 05 2013
| Edit |
Delete

Short answer: No.

Longer answer: it's the other way around. VS2012 introduces support for 3rd party test runners.

1 - 20 of 28 Items   
Sign in to start a discussion


  • TFS 2012 Build Server NUnit Exception
    2 Posts | Last post Tue 7:58 PM
    • I have a NUnit test project that I'm trying to run on my TFS 2012 Build server. I'm getting the following error:
      
          Exception System.InvalidOperationException, Exception thrown executing tests
          No test is available in C:\Builds\1\Projects\NUNIT Test\bin\NUnitTestProject.dll C:\Builds\1\Projects\NUNIT Test\bin\NUnitTestProject.dll. Make sure that installed test discoverers & executors, platform & framework version settings are appropriate and try again.
      
      I Have the NUnit.VisualStudio.TestAdapter 1.1.0.0 installed from NuGet and referenced in the project.
      
      I also have set the Version control path to custom assemblies set on the controller, which contains (they basically are a copy of the NuGet package):
      nunit.core.dll
      nunit.core.interfaces.dll
      nunit.util.dll
      NUnit.VisualStudio.TestAdapter.dll
      
      For test purposes, I'm only building the NUnit test project.
      
      My test class is very simple and is the following:
      
      using NUnit.Framework;
      
      namespace NUnitTestProject
      {
          [TestFixture]
          public class MySuperTests
          {
              [Test]
              public void MyFirstUnitTestMethod_ReturnsTrue()
              {
                  Assert.IsTrue(true);
              }
          }
      }
      
      Is there something I haven't done correctly?
      
    • The problem I believe lies in the 1.1.X.X version.
      Updating to 1.1.0.7 I did not have the exception anymore, however, I did have the tests not found problem.
      
      There are some issues going on about that on github https://github.com/nunit/nunit-vs-adapter/
  • shailp
    1 Posts | Last post July 15, 2014
    • I am getting below error while running nunit test.
      
      ------ Run test started ------
      Could not find test executor with URI 'executor://nunittestexecutor/'.  Make sure that the test executor is installed and supports .net runtime version 2.0.50727.5477.
      
      fairly new with nunit. checked with https://bugs.launchpad.net/nunit-vs-adapter/+bug/1184231 of #10. But could not resolve the issue. I am using VS2012 with 3.5 framework. NUnit.VisualStudio.TestAdapter.dll version is 0.95.0.0
      
      Did anybody had the same problem. Appreciate if you can share the resolution.
  • No tests available
    11 Posts | Last post June 16, 2014
    • I'm getting the following in VS 2013 Preview and VS 2012 Update 3:
      
      ------ Discover test started ------
      NUnit 0.96.0.4 discovering tests is started
      NUnit 0.96.0.4 discovering test is finished
      ========== Discover test finished: 158 found (0:00:01.993278) ==========
      ------ Run test started ------
      No test is available in {list of assemblies}. Make sure that installed test discoverers & executors, platform & framework version settings are appropriate and try again.
      ========== Run test finished: 0 run (0:00:00.1640103) ==========
      
      
      Is anyone else getting this?
    • I'm having this issue as well, did you find a solution?
    • Unfortunately I have not figured out a way around this.
    • Thanks for your reply Mike.
    • I have the same issue with Team Foundation Service and an onsite tfs 2013 build controller. Anyone have a work around?
    • Sorry for late response. Do you guys still have this issue ?  Have you updated to 0.97 ?  
      Do you use the nuget adapter or the extension adapter ?
      I have seen this in some cases, but have no consistent repro.  Can one of you provide  a small repro, mail to terje at Osiris.no.  
    • I run the latest version, haven't had a problem, then I added a class that inherited from another testclass and suddenly I got this problem. If I remove the inheritence the problem disappears. 
    • And after a little more work, I found that I had a testmethod with a parameter that had the same name as another method with another type of parameter. Changed the name, and voala, working again. 
    • I have the same erreur when adding an app.config file with a configSection :
      ========== Discover test finished: 32 found (0:00:00,4980285) ==========
      ------ Run test started ------
      NUnit 1.0.0.0 executing tests is started
      Run started: C:\Dev\TestGenerator\Foundation.Tests\bin\Debug\Foundation.Tests.dll
      Exception thrown executing tests in C:\Dev\TestGenerator\TestGenerator.Tests\bin\Debug\TestGenerator.Tests.dll
      System.Configuration.ConfigurationErrorsException: Configuration system failed to initialize ---> System.Configuration.ConfigurationErrorsException: Only one <configSections> element allowed per config file and if present must be the first child of the root <configuration> element. (C:\Dev\TestGenerator\TestGenerator.Tests\bin\Debug\TestGenerator.Tests.dll.config line 11)
         at System.Configuration.ConfigurationSchemaErrors.ThrowIfErrors(Boolean ignoreLocal)
         at System.Configuration.BaseConfigurationRecord.ThrowIfParseErrors(ConfigurationSchemaErrors schemaErrors)
         at System.Configuration.BaseConfigurationRecord.ThrowIfInitErrors()
         at System.Configuration.ClientConfigurationSystem.EnsureInit(String configKey)
         --- End of inner exception stack trace ---
      
      Server stack trace: 
         at System.Configuration.ClientConfigurationSystem.EnsureInit(String configKey)
         at System.Configuration.ClientConfigurationSystem.PrepareClientConfigSystem(String sectionName)
         at System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection(String sectionName)
         at System.Configuration.ConfigurationManager.GetSection(String sectionName)
         at System.Configuration.PrivilegedConfigurationManager.GetSection(String sectionName)
         at System.Diagnostics.DiagnosticsConfiguration.GetConfigSection()
         at System.Diagnostics.DiagnosticsConfiguration.Initialize()
         at System.Diagnostics.DiagnosticsConfiguration.get_IndentSize()
         at System.Diagnostics.TraceInternal.Init
    • ALea, thanks for posting your findings. I'm running into the same issue. I had some classes in my test DLL that inherit from classes in my source code DLL. (The classes in question do not contain any unit tests themselves - they are merely helper/fake classes.) If I comment out the inheritance, voila - the tests appear in Test Explorer.
      
      I would file a bug, but the bug report link takes me to Launchpad, where it says the NUnit Test Adapter project no longer uses Launchpad. (If there is somewhere else I should file a bug, I will be happy to do so.)
      
      I'm using Visual Studio Ultimate 2012 (Version 11.0.61030.00 Update 4).
    • Hi Ms Krysta.  You can file the bug at Issues under https://github.com/nunit/nunit-vs-adapter/
      
      If you also can upload/attach a small repro, we would be grateful. 
  • Test Discovery Issue
    2 Posts | Last post June 13, 2014
    • I'm new to running unit tests from Visual Studio. 
      
      I installed NUnit framework and adapter in my solution (via NuGet) in my VS 2013 Express and try running the following experiment:
      
      using System;
      using NUnit.Framework;
      
      namespace UnitTestExperiment
      {
          [TestFixture]
          public class UnitTest1
          {
              [SetUp]
              public void SetUp() {}
      
              [Test]
              public void TestMethod1() {}
          }
      }
      
      Here is my packages.config:
      
      <?xml version="1.0" encoding="utf-8"?>
      <packages>
        <package id="NUnit" version="2.6.3" targetFramework="net45" />
        <package id="NUnitTestAdapter" version="1.0" targetFramework="net45" />
      </packages>
      
      After I successfully compile this code I get the following message:
      "Discover test finished: 0 found (0:00:00.0362595)"
      
      Any clue?
    • Alex, this might be too late to be helpful for you, but see the thread started by Mike Paterson on 7/18/13 - I was running into the same issue. I haven't resolved the issue, but I seem to have isolated the circumstances in which it appears - namely, if a class in my test DLL inherits from a class in my source code DLL.
  • Cannot run 64bit tests
    3 Posts | Last post March 29, 2014
    • Run x64 platform test project will get following message:
      'CR_ExtUnitTestRunnerNet4x64.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_64\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll'. Cannot find or open the PDB file.
      'CR_ExtUnitTestRunnerNet4x64.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\Program Files (x86)\DevExpress 13.2\CodeRush\System\CodeRush\Bin\PlugIns\CR_ExtUnitTestRunnerNet4x64.exe'. Cannot find or open the PDB file.
      'CR_ExtUnitTestRunnerNet4x64.exe' (CLR v4.0.30319: CR_ExtUnitTestRunnerNet4x64.exe): Loaded 'C:\Windows\assembly\GAC_MSIL\DevExpress.CodeRush.Core\13.2.7.0__35c9f04b7764aa3d\DevExpress.CodeRush.Core.dll'. Cannot find or open the PDB file.
      'CR_ExtUnitTestRunnerNet4x64.exe' (CLR v4.0.30319: CR_ExtUnitTestRunnerNet4x64.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Remoting\v4.0_4.0.0.0__b77a5c561934e089\System.Runtime.Remoting.dll'. Cannot find or open the PDB file.
      'CR_ExtUnitTestRunnerNet4x64.exe' (CLR v4.0.30319: CR_ExtUnitTestRunnerNet4x64.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll'. Cannot find or open the PDB file.
      'CR_ExtUnitTestRunnerNet4x64.exe' (CLR v4.0.30319: CR_ExtUnitTestRunnerNet4x64.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll'. Cannot find or open the PDB file.
      'CR_ExtUnitTestRunnerNet4x64.exe' (CLR v4.0.30319: CR_ExtUnitTestRunnerNet4x64.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll'. Cannot find or open the PDB file.
      'CR_ExtUnitTestRunnerNet4x64.exe' (CLR v4.0.30319: CR_ExtUnitTestRunnerNet4x64.exe): Loaded 'C:\Program Files (x86)\DevExpress 13.2\CodeRush\System\CodeRush\Bin\PlugIns\CR_NUnitTesting.dll'. Cannot find or open the PDB file.
      'CR_ExtUnitTestRunnerNet4x64.exe' (CLR v4.0.30319: CR_ExtUnitTestRunnerNet4x64.e
    • I am sorry, it seems a CodeRush issue...
      But I cannot run tests in x64 platform project, I still cannot find out why
    • And you have set the Test/Test settings/Default Processor Architecture to x64 ?
  • Run after local build
    3 Posts | Last post March 29, 2014
    • I would like to turn this feature off, while developing tests. If I have multiple tests, I would like to run only the one I am developing, but this runs all tests every time I rebuild the one I am working on.
      
      Any suggestions?
    • When using the NUnit Gui, you are able to re-run the last set of tests executed. Such an option could be made available with the adapter.
      
      However, since the adapter merely runs what Test Explorer tells it to run, such a feature enhancement would have to be made in Test Explorer rather than the adapter.
    • The Run Tests After Build will follow whatever you set into the search box.  If you add a criteria there to limit the number of tests, the RTAB will only run those tests.  You can also use a playlist, the RTAB will then only run the tests in that playlist.
  • Generating test results?
    2 Posts | Last post January 27, 2014
    • I'd like to generate a SpecFlow test report using NUnit test result outputs (as outline here: https://github.com/techtalk/SpecFlow/wiki/Reporting), however there doesn't seem to be a way of configuring test result output files when using the NUnit Test Adapter. Is this a missing feature from the Test Adapter or is there some other way to configure the test output files?
    • Also, I am using VS 2013 and TFS 2013
  • VS 2013 Released (not Preview) version
    2 Posts | Last post November 28, 2013
    • Cannot run tests in Tests Explorer in Microsoft Visual Studio Premium 2013,
      Version 12.0.21005.1 REL
    • Seems, after reboot system, it started to work. Solved.
  • Silverlight
    4 Posts | Last post October 23, 2013
    • 3.i
      Did anyone figure out how to use this with Silverlight? Thanks.
    • The adapter includes standard NUnit 2.6.2, which is not built for Silverlight. If you download the source, you can use NUnitLite under Silverlight, or wait for the next binary release, NUnitLite 0.9. Unfortunately, there is no VS adapter for NUnitLight, but we could think about creating a version if there is enough interest. Let us know here or on the nunit-discuss list.
    • Hi Charlie,
      I would be interested in that. 
      Which testrunner should I use until this is going to happen? NUnitLite is lacking a Provider Definition so that I could integrate it with the SL Testframework.
      
      Cheers,
      Christoph
    • We would like that as well. It would really integrate with our build nicely.
      
  • Group by Fixture / Class
    1 Posts | Last post October 23, 2013
    • Hi, 
      in the release notes of the adapter it says: "Grouping by fixture is not yet available.in Visual Studio".
      Well... I think with Update 3 or 4 VS 2012 included this grouping. However, it doesn't seem to work as intended. If I create subclasses, e.g.
      
      class Parent
         <Test> Sub DoSth()
      End Class
      
      Class Child
         inherits Parent
      End Class
      
      then the Test Explorer displays two tests in two groupings, and both groups are named "Parent". I'm pretty sure MSTest is doing this right, so I have to assume that the test adapter is reporting the test class names wrong for some reason.
      
      Is this a known issue? And if so, is there a solution to it?
      
      Regards
1 - 10 of 44 Items