0
votes

I'm setting up a Release Management pipeline for my unit test environment to run some Selenium tests on a Windows 10 VM agent and am encountering errors when trying to run the Visual Studio Test Agent Deployment task on the VM.

My release definition includes the following steps: - Windows Machine File Copy - Visual Studio Test Agent Deployment - Run Functional Tests

I have checked the usual pitfalls with WinRM

My release definition includes the following steps: - Windows Machine File Copy - Visual Studio Test Agent Deployment - Run Functional Tests

I have checked the usual pitfalls like WinRM and ran the ConfigureWinRM.ps1 as reference in https://docs.microsoft.com/en-us/azure/devops/pipelines/apps/cd/deploy-webdeploy-iis-winrm?view=azure-devops and found also this article PowerShell Remoting error with TFS build Visual Studio Test Agent Deployment task without success.

Here is the error output 2019-07-16T11:42:11.7619316Z ##[warning]Task 'VerifyTestAgentInstalled' for machine XXXXXXXX.com:5985's Error : System.Management.Automation.Remoting.PSRemotingTransportException: Connecting to remote server XXXXXXX.com failed with the following error message : The client cannot connect to the destination specified in the request. Verify that the service on the destination is running and is accepting requests. Consult the logs and documentation for the WS-Management service running on the destination, most commonly IIS or WinRM. If the destination is the WinRM service, run the following command on the destination to analyze and configure the WinRM service: "winrm quickconfig". For more information, see the about_Remote_Troubleshooting Help topic.

Any help is greatly appreciated. I need a fresh set of eyes.

Thanks!

1
I forgot to mention that the account used to access the build agent and the account with TFS services run under are local admins on the Windows 10 VM.4JTB

1 Answers

0
votes

According to the error message, it seems this issue was caused by the WinRM service. Please make sure you configure and enable the WinRM service on the target server no problem.

Besides, if your local network or VM network behind a VPN. Try to turn off the VPN and test again.

If your VM has any firewall or anti-virus software. Temporarily turn of them which could help to narrow down the issue.

I forgot to mention that the account used to access the build agent and the account with TFS services run under are local admins on the Windows 10 VM.

TFS will use Build Service Account to establish the connect. Make sure this account have enough permission to remote VM and install the test agent.

You could also directly use this build service account to RDP the VM machine and install test agent check if you are able to do this.

Lastly, Visual Studio Test Agent Deployment task which is deprecated in Azure Pipelines and TFS 2018 and later. Because of issues such as the one you are facing above. The recommendation now is to use the vsts-agent on the remote machines.

You could also upgrade your TFS version, then Use version 2.x or higher of the Visual Studio Test task together with jobs to run unit and functional tests on the universal agent. For more details, see Testing with unified agents and jobs.