首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何通过TFS2015运行UI测试?

如何通过TFS2015运行UI测试?
EN

Stack Overflow用户
提问于 2015-10-01 06:23:45
回答 2查看 3.8K关注 0票数 2

我将TFS-2013升级到TFS-2015,然后用3个步骤定义新的构建定义。

  1. MSBuild
  2. Visual测试代理部署
  3. 使用测试代理的测试

我为第二步选择了测试组,并为第三步添加了用户名和密码。我选择了包含测试DLL的测试组和测试拖放文件夹,并添加了包含编码UI测试方法的DLL文件名来测试程序集。

当我试图部署测试代理时,我发现了以下日志:

debugCalling Invoke-DeployTestAgent DistributedTests:开始在测试机器上部署和配置测试代理。G:\agentui\tasks\DeployVisualStudioTestAgent\1.0.2\TestAgentInstall.:DistributedTests: TestPC3 DistributedTests:用户名: user123 DistributedTests:机器组名称: testui DistributedTests: remote : True DistributedTests: DistributedTests自动登录:禁用屏幕保护程序:真DistributedTests:代理位置:\user-pc\drop_Location\vstf_testagent.exe : Update测试代理:只运行测试代理DataCollection : False DistributedTests:用于在远程计算机上安装测试代理的脚本路径:在远程机器上配置测试代理的脚本路径: G:\agentui\tasks\DeployVisualStudioTestAgent\1.0.2\TestAgentConfiguration.ps1 DistributedTests:用于检查远程计算机上是否安装了测试代理的脚本路径: G:\agentui\tasks\DeployVisualStudioTestAgent\1.0.2\CheckTestAgentInstallation.ps1 DistributedTests: Creating DTL client DistributedTests: Got with name = testui project = TestBuildLifeCycle DistributedTests: Got machines name = testui project = TestBuildLifeCycle DistributedTests:清理机器标记DistributedTests:删除标记'Microsoft-机器上的C:\Users\userFolder\AppData\Local\Temp\2c15a489-7765-4a41-b78e-09197ee5d2c8\vstf_testagent.exe ' TestPC3‘DistributedTests:从机器上获取机器列表已完成的DistributedTests:用TestAgent标记DistributedTests更新环境资源:测试代理被复制到:AgentsForVS DistributedTests:准备将文件从C:\Users\userFolder\AppData\Local\Temp\2c15a489-7765-4a41-b78e-09197ee5d2c8\vstf_testagent.exe复制到$env:SystemDrive\TestAgent DistributedTests:为Agent设置复制任务:TestPC3DistributedTests:需要运行任务CopyFilesToTestAgent的机器总数:1 DistributedTests:机器'TestPC3‘上的任务'CopyFilesToTestAgent’正在运行-- DistributedTests:任务'CopyFilesToTestAgent‘在机器'TestPC3’上完成。DistributedTests:用于机器TestPC3 3状态的任务'CopyFilesToTestAgent‘:失败DistributedTests:用于机器TestPC3 3的日志: System.AggregateException:未能在机器上创建工作目录的任务'CopyFilesToTestAgent’。有关错误的详细信息,请参阅下面的日志。指定路径C:\Users\J3CA7~1.JSH不存在的对象。

我使用管理员的凭据并通过安装代理手册解决了这个问题,但需要使它能够编辑代理,我注意到该进程试图将测试代理复制到appData中的临时文件夹,然后尝试将该代理复制到c:\testAgent,但它失败了

EN

回答 2

Stack Overflow用户

发布于 2015-10-02 10:13:11

如果正在运行编码的UI测试,则必须将构建代理配置为以交互方式运行。在尝试使用构建过程运行测试之前,请确保它们可以在计划使用的生成服务器上运行。

有些事情你应该注意:

制备

  1. 确保将解决方案和测试文件签入版本控制。
  2. 要运行单元测试或编码的UI测试,必须安装或更高版本的
  3. 许多测试和测试操作(包括代码UI测试)要求您在构建代理上安装与您的团队在其开发工具机器上使用的相同版本的Visual

以交互模式运行生成服务器

  1. 标识将充当构建服务帐户的用户帐户。构建服务帐户必须:
代码语言:javascript
复制
- Be a member of the Windows Administrators group on the build server.
- Be a member of the Build Service Accounts group on your team project collection.
- Have Change and Read privileges on the drop folder, if any, that you plan to specify in your build definition.

  1. 在“生成服务属性”对话框中,选择“Stop the service”。
  2. 在“运行服务as”下,选择“Change”,然后指定构建服务帐户的凭据。
  3. 选择Run the Service interactively
  4. 选择Start,然后选择OK
  5. 将生成服务帐户登录到生成服务器。

有关更多细节和屏幕截图:https://msdn.microsoft.com/en-us/library/ms181712(v=vs.120).aspx#interactive

票数 2
EN

Stack Overflow用户

发布于 2015-10-07 20:10:06

在步骤2(部署测试代理)中,您需要启用“交互式”选项。

有关更多细节:https://github.com/Microsoft/vso-agent-tasks/blob/master/Tasks/DeployVisualStudioTestAgent/README.md

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/32880711

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档