如何配置 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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
实际上,您不必对模板进行任何更改。只需确保您的构建定义引用了为远程执行配置的正确测试和测试设置文件。
第 1 步:
请打开 http://msdn.microsoft.com/en-us/library/ee256991 .aspx 并向下滚动到“向解决方案添加用于远程执行或数据收集的测试设置”部分。按照此步骤创建用于远程执行的测试设置文件。
第 2 步:
编辑您的构建定义:转到“流程”页面,在标题“2. 基本”下,通过单击末尾的“...”打开“自动化测试”对话框。在“自动化测试”对话框中,单击“添加”。然后浏览您的测试设置文件(对于远程执行,您刚刚创建的文件)并确认您的选择。
现在保存您的构建定义并对构建进行排队。您的测试现在自动在远程系统上执行,因为您的 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.
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.
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.
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.