TFS-启用“重新运行失败的测试"
我有一个TFS发行版定义,该定义在部署过程中运行多个测试:
I have a TFS Release definition that runs several tests as part of the deployment:
当我在"Visual Studio测试"步骤中选中重新运行失败的测试"选项时:
When I check the "Rerun Failed Tests" Option in my "Visual Studio Test" step in:
我的单元测试不再作为我的发行版的一部分运行.发布失败,并在"Visual Studio测试"步骤中出现以下错误:
My unit tests no longer run as part of my release. The release fails with the following error in the "Visual Studio Test" step:
2019-02-22T16:21:33.0983821Z ## [错误]打开响应文件时出错 'C:\ TFS'2019-02-22T16:21:33.1413767Z ## [错误]测试源文件 找不到提供的"C:\ TFS代理\ _work \ r6 \ a \ Agent_work_temp \ ea14a091-36bd-11e9-99f5-51895cf3942e.txt".
2019-02-22T16:21:33.0983821Z ##[error]Error opening response file 'C:\TFS' 2019-02-22T16:21:33.1413767Z ##[error]The test source file "C:\TFS Agent\ _work\r6\a\Agent_work_temp\ea14a091-36bd-11e9-99f5-51895cf3942e.txt" provided was not found.
自从错误以以下语句开始以来,我一直认为:
I figured since the error started with the following statement:
打开响应文件'C:\ TFS'时出错
Error opening response file 'C:\TFS'
TFS测试运行程序存在某种错误,其中对执行测试任务的调用未将路径放在引号中.我将所有TFS生成代理更改为对所有生成使用以下类型"的路径(我从TFS代理所在的文件夹中删除了所有空格):
That there is some sort of bug with the TFS test runner where the call to the task to execute the tests is not putting the path in quotes. I changed all my TFS build agents to using the following "type" of paths for all builds(I removed all spaces from the folder the TFS agents lived in):
C:\ TFSAgent \ _work
C:\TFSAgent\ _work
它现在似乎可以工作了...
And it seems to work now...