user829174
user829174

Reputation: 6362

Nunit running all tests on TestFixture even when selecting single test

I'm running Nunit 3.5 on VS2015, Resharper Ultimate 10,

created this TestFixture

[TestFixture]
public class TestInfluxDbConnector
{
    [Test]
    public void TestPong()
    {
        // Arrange
        InfluxDbProxy influxDb = new InfluxDbProxy();

        // Act
        Task<bool> res = influxDb.PingAsync();

        // Assert
        Assert.IsTrue(res.Result);
    }

    [Test]
    public void CreateDatabaseAsync()
    {
        // Arrange
        InfluxDbProxy influxDb = new InfluxDbProxy();

        // Act
        var databseAsync = influxDb.CreateDatabseAsync("Test");

        // Assert
        Assert.IsTrue(databseAsync.Result);
    }
}

Why when I'm debugging a single Test all tests are running? (I want to debug / run only a single test)

enter image description here

Upvotes: 3

Views: 1196

Answers (1)

I had the same issue when I had updated nunit 2.6.4 to nunit 3.5.0. Try do this:

  1. Disable Nunit Test Adapter in "extensions and updates".
  2. Install Nunit3TestAdapter. Link: https://visualstudiogallery.msdn.microsoft.com/0da0f6bd-9bb6-4ae3-87a8-537788622f2d
  3. In Visual Studio use "Tests"->"Windows"->"Test Explorer" and run tests only from this window.

Only this way is working for me at the moment. Probably nunit 3.5 is new for Resharper and they cannot work fine at the moment.

Upvotes: 2

Related Questions