我正在尝试使用vstest.console.exe
运行我的xUnit单元测试,但是没有找到任何测试。
我正在使用来自Visual Studio 2015的vstest.console.exe
,可在以下位置找到:
C:\ Program Files(x86)\ Microsoft Visual Studio 14.0 \ Common7 \ IDE \ CommonExtensions \ Microsoft \ TestWindow
运行的命令:
vstest.console.exe "C:\MyProject\artifacts\bin\UnitTest\Release\dnx451\UnitTest.dll" /TestAdapterPath:"C:\MyProject\packages"
反馈:
开始测试执行,请稍候...
警告:所提供的源中没有可用的测试。请确保已安装正确的测试发现器和执行器、平台和框架版本设置,并重试。
我还尝试了使用以下TestAdapterPath参数,但问题依旧:
/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"
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": { } } }
我该如何运行这些测试?
编辑:使用DNX beta6运行时。
dnx . test
吗? - Victor Hurdugaci