问题:为 Visual Studio 2015 安装 SP1 后,我无法从命令行执行通用测试。
我的命令行和输出是下一个:
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe" "S:\Tests\MyTests.dll" "/Settings:S:\Tests\MyTest.runsettings" "/ListTests:S:\Tests\MyTests.GenericTest" /InIsolation /Enablecodecoverage /Logger:Console
执行通用测试
"..\packages\NUnit.Runners.2.6.4\tools\nunit-console.exe"
使用命令行参数
"..\MyNUnitProject.nunit" "/noshadow" "/process=Separate" "/Config=UnitTests" "/xml=..\nunit.UnitTests.results.xml"
vstest.console.exe返回以下输出:
[exec] Microsoft (R) Test Execution Command Line Tool Version 14.0.24720.0
[exec] Copyright (c) Microsoft Corporation. All rights reserved.
[exec] The following Tests are available:
[exec] Warning: No test is available in s:\Tests\MyTests.dll, s:\Tests\MyTests.GenericTest. Make sure that installed test discoverers & executors, platform & framework version settings are appropriate and try again. Additionally, you can try specifying '/UseVsixExtensions' command if the test discoverer & executor is installed on the machine as vsix extensions and your installation supports vsix extensions. Example: vstest.console.exe myTests.dll /UseVsixExtensions:true
[exec] Starting test discovery, please wait...
[exec] Warning: No test is available in s:\Tests\MyTests.dll, s:\Tests\MyTests.GenericTest. Make sure that installed test discoverers & executors, platform & framework version settings are appropriate and try again. Additionally, you can try specifying '/UseVsixExtensions' command if the test discoverer & executor is installed on the machine as vsix extensions and your installation supports vsix extensions. Example: vstest.console.exe myTests.dll /UseVsixExtensions:true
在为Visual Studio 2015安装SP1之前,一切正常。我得到了测试结果和代码覆盖率。