Running xUnit tests with vstest

I am trying to run my xUnit unit tests with vstest.console.exe, but no tests were found.

I am using vstest.console.exefrom Visual Studio 2015 found in this place:

C: \ Program Files (x86) \ Microsoft Visual Studio 14.0 \ Common7 \ IDE \ CommonExtensions \ Microsoft \ TestWindow

Command start:

vstest.console.exe "C:\MyProject\artifacts\bin\UnitTest\Release\dnx451\UnitTest.dll" /TestAdapterPath:"C:\MyProject\packages"

Answer:

Launching a test run, please wait ...

Warning: the test is not available in the provided sources. Make sure that the installed test openers & performers, platform, and framework version settings are retried.

I also tried using the following TestAdapterPath arguments, but with the same problem:

/TestAdapterPath:"C:\MyProject\packages\xunit.runner.visualstudio"

/TestAdapterPath:"C:\MyProject\packages\xunit.runner.visualstudio\2.1.0-beta4-build1109"

/TestAdapterPath:"C:\MyProject\packages\xunit.runner.visualstudio\2.1.0-beta4-build1109\build" 

/TestAdapterPath:"C:\MyProject\packages\xunit.runner.visualstudio\2.1.0-beta4-build1109\build\_common"  

File project.json:

{
  "dependencies": {
    "xunit": "2.1.0-beta4-build3109",
    "xunit.runner.dnx": "2.1.0-beta4-build134",
    "xunit.runner.visualstudio": "2.1.0-beta4-build1109"
  },
  "commands": {
    "test": "xunit.runner.dnx"
  },
  "frameworks": {
    "dnx451": { }
  }
}

How do I run these tests?

EDIT: Using the DNX beta6 executable.

+4
2

dnx . test

+3

vstest project.json UseVsixExtensions.

, : .\vstest.console.exe "..\test\YourProject.Tests\project.json" /UseVsixExtensions:true /logger:trx

VSO : enter image description here

: .NET Core VSTS

+3

All Articles