0

I have a simple NUnit test that makes a simple WebAPI call:

[TestFixture]
public class PerformanceTests
{
    private const string web_api = <myapiurl>;

    [Test]
    public async Task PerformanceTest()
    {
        var response = await client.GetAsync(web_api);
        Assert.AreEqual(HttpStatusCode.OK, response.StatusCode);
    }
}

The test runs fine in Visual Studio when run using the normal test runner and also via ReSharper; it is highlighted as a NUnit test.

I have Taurus installed and have created a simple yml file to run my test:

execution:
- executor: nunit
  iterations: 500
  scenario:
    script: C:\Users\...\tests.dll  # assembly with tests

When I run the yml file in Taurus:

bzt my-nunit-tests.yml

the tests do not run and I get the following output:

Target: C:\Users\...\tests.dll
15:36:51 ERROR: NUnitExecutor STDERR:
Unhandled Exception: System.ArgumentException: Nothing to run, no tests were loaded
at NUnitRunner.NUnitRunner.Main(String[] args)

It would seem that the custom Taurus NUnit test runner is not picking up the tests. I can run the tests with the standard dotnet test command (the project does have the Microsoft.NET.Test.Sdk as a dependency).

As my test project is .NET Core I am publishing the project to ensure all dependencies are included. This ensures all the files specified here are in the same directory as the test assembly.

Update: I have created the exact same test project but in .NET Framework and Taurus finds the tests. To me this suggests the custom Taurus NUnit Test Runner doesn't work with .NET Core projects but I can't confirm this.

asoser
  • 1
  • 2

1 Answers1

0

As of June 2018 Taurus' Custom NUnit runner does not support .NET Core. It would seem that this is because NUnit does not allow .NET Core tests to be run via the .NET Framework engine.

asoser
  • 1
  • 2