Visual Studio测试代理部署执行时出错 [英] Error while Visual Studio Test Agent Deployment executing

查看:88
本文介绍了Visual Studio测试代理部署执行时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试使用TFS 2015构建过程来部署测试代理时,我收到以下错误:


无法解析路径$ env:SystemDrive \ TestAgent。


我的配置包含一台包含TFS 2015 RTM,VS 2015和构建代理的计算机。 代理程序作为网络服务运行,代理程序安装使用的凭据位于计算机上的管理员组中。


要重现:


  1. 创建新版本
  2. 添加步骤Visual Studio测试代理部署
  3. 使用构建计算机添加新测试计算机组
  4. 输入凭据
  5. 队列构建

以下是整个日志文件:




  •  2015-09-10T15:32:45.4520508Z执行powershell脚本:C:\Program Files \ Microsoft Office Team Server 14.0\Build\tasks \ DisloyVisualStudioTestAgent \1.0.2\DeployTestAgent.ps1 



  •  2015- 09-10T15:32:45.6920508Z DistributedTests:开始在测试机器上部署和配置测试代理。



  •  2015-09-10T15:32:45.7020508Z DistributedTests:提供的输入是:



  •  2015-09-10T15:32:45.7020508Z DistributedTests:Machines:



  •  2015-09-10T15:32:45.7020508Z DistributedTests:用户名:%MyUserId%



  •  2015-09-10T15:32:45.7020508Z DistributedTests:计算机组名称:%GroupName%



  •  2015-09-10T15:32:45.7020508Z DistributedTests:作为进程运行:False 



  •  2015-09-10T15:32:45.7120508Z DistributedTests:自动登录:False 



  •  2015-09-10T15:32:45.7120508Z DistributedTests:禁用屏幕保护程序:False 



  •  2015-09-10T15:32:45.7120508Z DistributedTests:代理位置:C:\\ \\Test \vstf_testagent.exe 



  •  2015-09-10T15:32:45.7120508Z DistributedTests:更新测试代理:True 



  •  2015-09-10T15:32:45.7120508Z DistributedTests:仅将测试代理作为DataCollection运行:False 



  •  2015-09-10T15:32:45.7120508Z DistributedTests:在远程计算机上安装测试代理的脚本路径:C:\Program Files \ Microsoft Office Team Server 14.0\Build \\ tasks \ DisloyVisualStudioTestAgent \1.0.2 \ TestAgentInstall.ps1 



  •  2015-09-10T15:32:45.7120508Z DistributedTests:在远程计算机上配置测试代理的脚本路径:C:\Program Files \ Microsoft Office Team Server 14.0\Build\tasks\DeployVisualStudioTestAgent\1.0.2 \ TestAgentConfiguration.ps1 



  •  2015-09-10T15:32:45.7120508Z DistributedTest s:检查远程计算机上是否安装了测试代理程序的脚本路径:C:\Program Files \ Microsoft Office Team Foundation Server 14.0\Build\tasks\DeployVisualStudioTestAgent\1.0.2\CheckTestAgentInstallation.ps1 



  •  2015-09-10T15:32:46.0​​120508Z DistributedTests:正在复制测试代理to:C:\ Windows\ServiceProfiles\NetworkService \ AppData \ Local \ Temp \ 4668204b-1b50-414b-ab3e-206a4bf3d85c\vstf_testagent.exe 



  •  2015-09-10T15:41:51.0120508Z DistributedTests:从此位置删除的文件:C:\ Windows \ ServiceProfiles \\ \\ NetworkService \ AppData \ Local \Temp \ 4668204b-1b50-414b-ab3e-206a4bf3d85c 



  •  2015-09-10T15:41:51.0220508Z ## [错误]无法解析路径$ env:SystemDrive \ TestAgent。


<二v class ="h2_lin">解决方案

嗨史密斯,     



感谢您的帖子。



您没有在Deploy to machines文本框中指定名称?请尝试使用此任务部署到一台特定的实验室机器,并检查结果。



您应该确保可以使用提供的凭证登录该特定实验室机器,并且可以手动在该计算机上安装测试代理程序。


When I try to use the TFS 2015 Build process to deploy the Test Agent, I receive the following error:

Unable to resolve path $env:SystemDrive\TestAgent.

My configuration consist of one machine that contains TFS 2015 RTM, VS 2015, and a build agent.  The agent runs as Network Service and the credentials used for the agent install are in the Administrators group on the machine.

To reproduce:

  1. Create a new build
  2. Add the step Visual Studio Test Agent Deploy
  3. Add a new Test Machine Group with the Build Machine
  4. Enter credentials
  5. Queue Build

Here is the entire log file:

  • 2015-09-10T15:32:45.4520508Z Executing the powershell script: C:\Program Files\Microsoft Team Foundation Server 14.0\Build\tasks\DeployVisualStudioTestAgent\1.0.2\DeployTestAgent.ps1

  • 2015-09-10T15:32:45.6920508Z DistributedTests: Starting to deploy and configure test agent on test machines.

  • 2015-09-10T15:32:45.7020508Z DistributedTests: Inputs provided are:

  • 2015-09-10T15:32:45.7020508Z DistributedTests: Machines: 

  • 2015-09-10T15:32:45.7020508Z DistributedTests: Username: %MyUserId%

  • 2015-09-10T15:32:45.7020508Z DistributedTests: Machine Group name: %GroupName%

  • 2015-09-10T15:32:45.7020508Z DistributedTests: Run as process: False

  • 2015-09-10T15:32:45.7120508Z DistributedTests: Login Automatically: False

  • 2015-09-10T15:32:45.7120508Z DistributedTests: Disable Screen saver: False

  • 2015-09-10T15:32:45.7120508Z DistributedTests: Agent location: C:\Test\vstf_testagent.exe

  • 2015-09-10T15:32:45.7120508Z DistributedTests: Update test agent: True

  • 2015-09-10T15:32:45.7120508Z DistributedTests: Run test agent as DataCollection only : False

  • 2015-09-10T15:32:45.7120508Z DistributedTests: Path to script that installs test agent on remote machine: C:\Program Files\Microsoft Team Foundation Server 14.0\Build\tasks\DeployVisualStudioTestAgent\1.0.2\TestAgentInstall.ps1

  • 2015-09-10T15:32:45.7120508Z DistributedTests: Path to script that configures test agent on remote machine: C:\Program Files\Microsoft Team Foundation Server 14.0\Build\tasks\DeployVisualStudioTestAgent\1.0.2\TestAgentConfiguration.ps1

  • 2015-09-10T15:32:45.7120508Z DistributedTests: Path to script that checks if test agent is installed on remote machine: C:\Program Files\Microsoft Team Foundation Server 14.0\Build\tasks\DeployVisualStudioTestAgent\1.0.2\CheckTestAgentInstallation.ps1

  • 2015-09-10T15:32:46.0120508Z DistributedTests: Test Agent is being copied to: C:\Windows\ServiceProfiles\NetworkService\AppData\Local\Temp\4668204b-1b50-414b-ab3e-206a4bf3d85c\vstf_testagent.exe

  • 2015-09-10T15:41:51.0120508Z DistributedTests: files deleted from this location: C:\Windows\ServiceProfiles\NetworkService\AppData\Local\Temp\4668204b-1b50-414b-ab3e-206a4bf3d85c

  • 2015-09-10T15:41:51.0220508Z ##[error]Unable to resolve path $env:SystemDrive\TestAgent.

解决方案

Hi Smith,     

Thanks for your post.

You didn’t specify a name in Deploy to machines textbox? Please try deploy to one specific lab machine using this task, and check result.

You should ensure you can logon that specific lab machine using the provided credential and can manually install the test agent on that machine.


这篇关于Visual Studio测试代理部署执行时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆