How can I get the NUnit GUI test runner to make itself available from Visual Studio?

1.1k views Asked by At

I NuGetted NUnit (v 3.0.1) and NUnit Test Adapter (v 2.0.0) into my VS 2013 project, and then wrote a class that should allow me to run a test:

using NUnit.Framework;

namespace RoboReporter
{
    [TestFixture]
    public class NUnitTest
    {
        [Test]
        public void Testy()
        {
            DateTime pseudoRandomDate = new DateTime(2016, 02, 24);
            DayOfWeek dow = DayOfWeek.Monday;
            DateTime retVal = RoboReporterConstsAndUtils.GetNextWeekday(pseudoRandomDate, dow);
            // The value returned should be 2/29/2016
            DateTime expectedVal = new DateTime(2016, 02, 29);
            Assert.AreEqual(expectedVal, retVal);
        }
    }
}

...but I cannot find the NUnit GUI to run, as spoken of here.

I tried to follow this, too, but can't invoke or even find, the NUnit Test runner anywhere. A search of my hard drive for "NUnit.exe" found no matches.

When I tried to use "C:\Projects\RoboReporter\RoboReporter\packages\NUnit.3.0.1\lib\net45\nunitframework.dll" as the external program to start, Visual Studio won't allow it (because it's a .DLL and expects an .exe, I guess).

Is there some setup step I'm leaving out? I even (after installing it via NuGet), went into Tools > Extensions and Updates and installed NUnit Test Adapter from there, too, but I still see no sign of NUnit anywhere (although there is a NUnit.3.0.1 folder within my project's Packages folder)).

UPDATE

I realized I was doing it wrong; I added a new project to my solution (a class library), and installed what is supposed to be the NUnit GUI Runner from here. Still, though, I see no such animal. "All Programs" does not have it; this article claims to have a link to it, but the link is not "live" so I googled "download NUnit GUI Test Runner" and downloaded/installed NUnit.3.0.1.msi, as recommended by T.S.

With my test project highlighted, selecting Test | Windows | Test Explorer shows no tests. I am stu[ck,mped] as to how to get NUnit operable.

UPDATE 2

I found this, which seemed promising, but I see no "downgrade" option for NUnit in my NuGet manager; once it's installed, "Uninstall" is the only button that exists, and there is no dropdown or other control allowing a downgrade...

1

There are 1 answers

3
Charlie On BEST ANSWER

You have an incompatible mix of software.

To run NUnit 3.0 tests you can use

  • The NUnit 3.0 console runner
  • The NUnit 3 Test Adapter CTP 8

Note that the NUnit 3 adapter is not the same software as the adapter you have installed.

To run the NUnit GUI for 3.0, I'm afraid you have to wait until we release it or build it from our source code. However it's not really ready for production use.

To go back to NUnit 2.6.4, uninstall 3.0 and then 're-install selecting the version in the drop-down.