lundi 3 août 2015

xunit.net ASP.NET vNext tests run from VS don't save output to xml

I have the following preconditions:

  1. Visual Studio 2015 Community, dnx version 1.0.0-beta5
  2. ASP.NET vNext project
  3. ASP.NET vNext project with unit-tests (further: Unit-test project)
  4. project.json in Unit-test project

    "frameworks": {
    "dnx451": {
       "dependencies": {
       "xunit": "2.1.0-beta3-*",
       "xunit.runner.dnx": "2.1.0-beta3-*",
       "xunit.abstractions": "2.0.0",
       "Moq": "4.2.1507.118",
        }
     }
    },
    "commands": {
    "test": "xunit.runner.dnx -xml TestResults.xml"
    },
    
    

When I run tests within Visual Studio, a new file TestResults.xml is created, but it is empty (except for

<?xml version="1.0" encoding="utf-8"?>
<assemblies>
  <assembly />
</assemblies>

When I run the command dnx . test -xml TestResults.xml from cmd, I get the xml file with results. What should I do to obtain the same result if run tests from Visual Studio?

Aucun commentaire:

Enregistrer un commentaire