mercredi 10 août 2016

Tests not showing in TestExplorer using Asp.Net core and Nunit

Please note I am fairly new to C# as well as testing.

My tests are not showing up in test explorer. I am using visual studio 2015 update 3 as well as using the new asp.net core project structure.

My project.json file looks as follows:

{
  "version": "1.0.0-*",
  "description": "Tests for the earthworm",

  "dependencies": {
    "earthworm": "1.0.0-*",
    "NSubstitute": "2.0.0-rc",
    "NUnit.Runners": "3.4.1",
    "NUnit3TestAdapter": "3.4.1",
    "NUnitLite": "3.4.1",
    "NUnit.Console": "3.4.1",
    "Microsoft.Dnx.TestHost": "1.0.0-rc1-final",
    "Microsoft.Dnx.Runtime": "1.0.0-rc1-final"
  },
  "testRunner": "nunit",
  "commands": {
    "Test": "earthworm.test"
  },

  "frameworks": {
    "dnx451": {}
  }
}

When I click the run all button in the test explorer, which should find all my tests, I am getting this output :

Discovering tests in 'C:\Users\daniel\Repos\earthworm\test\earthworm.test\project.json' 

and then nothing is showing up in the test explorer. I have tried looking at Testing .NET Core using NUnit 3 so it looks like if you are using the newest framework it is possible. I just want to know with dnx451 how to accomplish this.

Aucun commentaire:

Enregistrer un commentaire