TFS 2017 test task run fails on VS 2017 build machine if code coverage is enabled

落爺英雄遲暮 提交于 2019-12-05 18:20:12

The reason is that there isn’t /EnableCodeCoverage option if call vstest.console.exe tool directly. (Sepecify vstest.console.exe path for Visual Studio Test step/task). If call vstest.console command through Developer Command Prompt for VS 2017, it has /EnableCodeCoverage.

To deal with this issue, you can upgrade your TFS 2017 to TFS 2017 update 1, then select 2.* version of Visual Studio Test step/task, after that you can select Visual Studio 2017 option for VSTest version.

Update:

Another workaround is that, you can install agent for VS 2017 (Tools for Visual Studio 2017) on build agent, then specify vstest.console.exe path in test agent installation folder for Visual Studio Test step/task. (C:\Program Files (x86)\Microsoft Visual Studio\2017\TestAgent\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!