VSTS 和代理 2013

VSTS and Agents 2013

我正在尝试利用 SmartBear TestComplete 进行编码 UI 测试,作为我发布过程的一部分。我发现一条回复指出 TestComplete 不适用于 2015 测试代理:

Running TestComplete Tests Remotely with Visual Studio Test Agents

Test Controller

Test agents for Visual Studio 2015 do not support running functional tests remotely from Visual Studio. To run tests, use test controllers and test agents for Visual Studio 2013. You can find more information on it in the MSDN Library.

•Microsoft Test Controller for Visual Studio 2013. •TestComplete 12 (or TestExecute 12). •TestComplete 12 Visual Studio Integration Package. The Integration Package installer is shipped along with TestComplete. You can find it in the TestComplete folder after installing the product: TestComplete 12\VS Integration\VSIntegration.exe Run this installer after installing TestComplete on the test controller machine. In the installation wizard, select Build and Test Integration or Test Agent Integration feature appropriate for your test controller version.

Ref

我尝试在一台机器上安装 2013 Agents Update 5,包括代理和控制器。我的发布代理也安装在我网络上的虚拟机上,它不是云托管的。我在我的发布过程中添加了一个 "Run Functional Tests" 任务并尝试 运行 它,但我收到一条错误消息,表明我需要先 运行 "Deploy Test Agent" 任务:

[error]System.InvalidOperationException: The "Deploy Test Agent" task should be added before running the "Run Functional Test" task.

我尝试添加它,然后我开始收到似乎是网络错误的内容:

[warning]DistributedTests: Task 'PopulatingMachinesPresentState' for machine XXXXXX:5986's Log : Failed to establish remote power shell session to the deployment machine XXXXXX on the port:5986 due to unexpected exception. Error Message:
System.Management.Automation.Remoting.PSRemotingTransportException: Connecting to remote server XXXXXX failed with the following error message : WinRM cannot complete the operation. Verify that the specified computer name is valid, that the computer is accessible over the network, and that a firewall exception for the WinRM service is enabled and allows access from this computer. By default, the WinRM firewall exception for public profiles limits access to remote computers within the same local subnet. For more information, see the about_Remote_Troubleshooting Help topic.

所以我尝试暂时禁用防火墙:

netsh advfirewall set allprofiles state off

而且我还检查了 winrm:

winrm qc
WinRM service is already running on this machine. WinRM is already set up for remote management on this computer.

仍然无法正常工作。我想我会先检查 Stack,然后再深入兔子洞。有没有人让 Agents 2013 与本地发布代理一起工作?

首先,代理 2013 用于在 MTM 的实验室环境中进行测试或从 Visual Studio 测试进行远程测试。

您正在 build/release 中通过 运行 功能测试任务 进行测试,它使用代理 2015 而不是代理 2013 和 部署测试代理任务 将在目标机器上安装和配置测试代理 2015。

其次,关于WinRM问题,您需要启用文件和打印机共享,PowerShell版本为4.0或以上。

参考本文配置WinRM:Deploy your Web Deploy package to IIS servers using WinRM

相关脚本:ConfigureWinRM.ps1