简体   繁体   English

作为构建的一部分,在TFS 2017中运行Code-UI

[英]Running Coded-UI in TFS 2017 as part of the build

As per the documentation, in order to run Coded-UI as part of the build you need to have your build agent running as interactive Mode (Not as a service) also your Test Agent need to be deployed as Interactive Mode. 根据文档,为了将Coded-UI作为构建的一部分运行,您需要使构建代理以交互模式(而不是作为服务)运行,并且还需要将测试代理部署为交互模式。

Now the problem is when you deploy your test agent your build machine will restart automatically so your Build agent will not restart cause its not aa service. 现在的问题是,当您部署测试代理时,您的构建机器将自动重新启动,因此您的构建代理不会重新启动,因为它不是服务。

How can you work around this ? 您如何解决这个问题?

Two options: 两种选择:

  1. Don't use the build server as a test agent. 不要将构建服务器用作测试代理。 Depending on the complexity and size of the test suite, you can either run the tests directly on the deployed environment or have a dedicated group of test machines to parallelize the run. 根据测试套件的复杂性和大小,您可以直接在部署的环境上运行测试,也可以拥有一组专用的测试计算机来并行化运行。
  2. Install the test agent outside of a build process and just use the "run functional tests" task to connect to the already-running agent. 在构建过程之外安装测试代理,只需使用“运行功能测试”任务来连接到已在运行的代理。 The "Install test agent" task is really for scenarios closer to option #1, especially if you're doing things like provisioning test machines in the cloud on-demand. “安装测试代理”任务实际上是针对更接近选项#1的方案,尤其是当您执行诸如按需在云中配置测试机之类的操作时。

Since you would like to run Coded UI test, you have to configure the test agent to interact with the Desktop and build agent running as interactive Mode. 由于您要运行“编码的UI”测试,因此必须配置测试代理以与桌面交互并构建以交互模式运行的代理。

If you insist on installing the TFS Test agent on the same machine as the Build agent. 如果您坚持将TFS测试代理与Build代理安装在同一台计算机上。 You need to manually install and configure the agents first. 您需要首先手动安装和配置代理 Then specify the test agent installation media path in test agent deploy task and use Run Functional Test task to run Automated Test on agent machine . 然后在“测试代理部署”任务中指定测试代理安装介质路径,并使用“运行功能测试”任务在代理计算机上运行“自动测试”

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM