如何将 TFS 构建过程配置为通过测试控制器在测试代理上执行测试? [英] How can TFS build process be configured to execute tests on Test Agents through a Test Controller?

查看:19
本文介绍了如何将 TFS 构建过程配置为通过测试控制器在测试代理上执行测试?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个 Visual Studio 测试控制器,在特定的测试环境设置中有 3 个已注册的测试代理,用于我们的夜间自动化运行.我已经看过大量关于让构建代理运行测试的文档,但我们需要测试执行通过控制器并从测试代理运行.

We have a Visual Studio test controller with 3 registered test agents in a specific test environment setup for our nightly automation runs. I've seen ample documentation on having the build agents run the tests, but we need the test execution to go through the controller and run from the test agents instead.

我的想法是编辑构建过程模板,以便触发执行这些远程执行的测试,然后等待测试运行结果,但我没有构建模板的经验,也找不到任何示例展示我如何做到这一点.这当然是假设首先编辑构建过程是最好/正确的解决方案.

My thought was to edit the build process template so it would trigger the execution of these remotely executed tests and then wait for the test run results, but I have no experience with build templates and I've been unable to find any examples showing how I might accomplish this. And this is of course assuming that editing the build process is the best/correct solution in the first place.

能否请有在构建/部署周期结束时触发远程执行测试经验的人指出正确的方向?

Can someone with experience with triggering remote execution of tests at the end of a build/deploy cycle point me in the right direction please?

推荐答案

实际上,您不必对模板进行任何更改.只需确保您的构建定义引用了为远程执行配置的正确测试和 testsettings 文件.

Actually, you don'have to change anything to your template. Just make sure your build definition refers to the correct tests and testsettings file that are configured for remote execution.

第 1 步:请打开 http://msdn.microsoft.com/en-us/library/ee256991.aspx 并向下滚动到将远程执行或数据收集的测试设置添加到您的解决方案"部分.按照这个创建一个远程执行的测试设置文件.

Step 1: Please open http://msdn.microsoft.com/en-us/library/ee256991.aspx and scroll down to the section "Add a test settings for remote execution or data collection to your solution". Follow this to create a test settings file for remote execution.

第 2 步:编辑您的构建定义:转到 Process 页面,在标题2. Basic"下,通过单击末尾的..."打开Automated Tests"对话框.在自动测试对话框中,单击添加".然后浏览您的测试设置文件(对于远程执行,您刚刚创建的那个)并确认您的选择.

Step 2: Edit your build definition: go to the Process page, under heading "2. Basic", open the Automated Tests dialog by clicking the "..."at the end. It the Automated Tests dialog, click "Add". Then browse for your test settings file (for remote execution, the one you just created) and confirm your choices.

现在保存您的构建定义并将您的构建排队.自动地,您的测试现在在远程系统上执行,因为您的 testsettings 文件告诉您的构建系统这样做.

Now save your build definition and queue your build. Automagically, your tests are now performed on the remote system, because your testsettings file tells your build system to do so.

希望这足以让您的远程测试开始工作.

Hope that is enough to start your remote tests to work.

这篇关于如何将 TFS 构建过程配置为通过测试控制器在测试代理上执行测试?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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