Reputation: 21
I created a new coded UI test on VS2017 and after creating a new agent at the agents pool, I have the following error:
Error calling Initialization method for test class CodedUITestProject2.CodedUITest2: Microsoft.VisualStudio.TestTools.UITest.Extension.UITestException: To run tests that interact with the desktop, you must set up the test agent to run as an interactive process.
If you are running the tests as part of your team build, you must also set up the build agent to run as an interactive process.
It means that the agent couldn't interact with the desktop.
Upvotes: 1
Views: 371
Reputation: 33728
The Hosted agent is running as service, so you can’t do Coded UI test on Hosted agent.
You need to setup a private (self-host) agent with interactive mode)
More information, you can refer to the document:
Set up environments to run continuous test tasks with your build tasks FAQs
Upvotes: 2
Reputation: 843
It's not documented (https://learn.microsoft.com/en-us/vsts/pipelines/agents/hosted?view=vsts) but I don't think Microsoft hosted agents support the interactive mode.
For advanced requirements host your own agent
Upvotes: 0