My solution got Coded UI test for my simple Project. I'm able to build and release code to azure. Now, i want to run Coded UI test run after release (include/add this Coded UI Test in release pipeline).
Asked
Active
Viewed 686 times
1 Answers
3
You could use Visual Studio Test Agent Deployment and Run Functional Tests in your release pipeline just like build definition. About how to run Code UI test in TFS, you could refer below links:
- Setup for Test Servers to Run Coded UI Tests from VSO/TFS 2015
- Integrate Visual Studio Coded UI Test with VSTS/TFS Build pipeline
If you are using VSTS, also need to pay attention to some tiny cathes, take a look at this blog: Run Functional (Coded) UI Tests in your VSTS Release Pipeline
Update
you need to either set WinRM to use HTTPS (rather than the default HTTP), or add the machine you're connecting from as a Trusted Host on the machine you're connecting to.

PatrickLu-MSFT
- 49,478
- 5
- 35
- 62
-
Patrick - Thanks for the response. I've used the same task(VS Test Agent Deployment). I Was getting WINRM error as follows: _Connecting to remote server admsuser2 failed with the following error message : The WinRM client cannot process the request. If the authentication scheme is different from Kerberos, or if the client computer is not joined to a domain, then HTTPS transport must be used or the destination machine must be added to the TrustedHosts configuration setting_ I've fixed WinRM issue too through powershell....but still shows error – Shalem Jun 07 '17 at 05:48
-
@Shalem Sorry for the later reply. According to the error message, you need to either [set WinRM to use HTTPS](https://support.microsoft.com/zh-cn/help/2019527/how-to-configure-winrm-for-https) (rather than the HTTP in your screenshot) , or add the machine you're connecting from as a **Trusted Host** on the machine you're connecting to. How did you fixed this issue through powershell. – PatrickLu-MSFT Jun 12 '17 at 08:59
-
I've added my machine to Trusted Host through Powershell and verified but still same error. `winrm s winrm/config/client '@{TrustedHosts="SystemName"}'` `get-item wsman:\localhost\Client\TrustedHosts` – Shalem Jun 12 '17 at 09:10
-
@Shalem Suggest you give a try with the same task VS Test Agent Deployment deploying to the same machine through build definition instead of release definition. Which could narrow down the issue is related to your task settings or release environment. – PatrickLu-MSFT Jun 12 '17 at 09:20
-
My task is to run this test after deployment, directly on top of azure url :-( – Shalem Jun 12 '17 at 09:23
-
@Shalem Do you think the firewall could be the issue? Also give a try with *Enrico Campidoglio's* solution in this question: https://stackoverflow.com/questions/16010091/connecting-to-remote-server-failed-using-winrm-from-powershell `winrm quickconfig -transport:https` . Make sure you are running the powershell script as Administrator Mode. – PatrickLu-MSFT Jun 12 '17 at 09:30
-
I've enabled/exempted Port in firewall to avoid firewall blockage/issue. I don't think its any issue with firewall. Any other suggestion plz... – Shalem Jun 15 '17 at 06:44
-
@Shalem This task( Visual Studio Test Agent Deployment) also requires the target computer to have: 1. Windows 7 Service Pack 1 or Windows 2008 R2 Service Pack 2 or higher 2 .NET 4.5 or higher 3. PSRemoting enabled by running the [Enable-PSRemoting](https://msdn.microsoft.com/powershell/reference/5.1/microsoft.powershell.core/Enable-PSRemoting) PowerShell script Please double check if the target machine has met all the requirements. – PatrickLu-MSFT Jun 15 '17 at 07:25
-
I tried this on 2 systems. System 1 - Windows 8 with Vs2015 install. System 2 - Windows server with VS2015 installed. I've already ensured winRm enabled `winrm quickconfig` on these systems. Both the trails failed. – Shalem Jun 15 '17 at 07:37
-
1@Shalem Are you working on Azure Virtual Machines(target)? If so, you need to use https instead of http, **Azure Virtual Machines require WinRM to use the HTTPS protocol**. You can use a self-signed Test Certificate. According to the screenshot, you are choosing HTTP. More details about this please refer this paragraph in https://www.visualstudio.com/en-us/docs/build/steps/test/visual-studio-test-agent-deployment#windows-remote-management-winrm – PatrickLu-MSFT Jun 15 '17 at 07:59
-
Yes, am using Azure VM. I've provided certificate to connect to Azure(Azure Service Connection). I'm unaware of using/switching to https protocol usage.I just used http [default] channel. Some help to switch to https plz.... – Shalem Jun 15 '17 at 08:42
-
1@Shalem It's based on whether you are using Azure Classic Virtual Machines or Azure Resource Group. The virtual machine is already set up for WinRM over HTTPS, with the default port 5986 already opened in the firewall and a self-signed certificate installed on the machine. If you have an Azure Resource Group already defined in the Azure portal, you must configure it to use the WinRM HTTPS protocol. You need to open port 5986 in the firewall, and install a self-signed certificate. And in the task setting, the portal which will be used to connect to the target host, select https instead of http – PatrickLu-MSFT Jun 15 '17 at 08:58