我正在尝试使用 vstest.console.exe
运行我的 xUnit 单元测试,但没有找到测试。
我正在使用 vstest.console.exe
来自 Visual Studio 2015,可在以下位置找到:
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"
回复:
Starting test execution, please wait...
Warning: No test is available in the provided sources. Make sure that installed test discoverers & executors, platform & framework version settings are appropriate and try again.
我也尝试过使用以下 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
在你的项目上
关于visual-studio-2015 - 使用 vstest 运行 xUnit 测试,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32233590/