Visual studio 2015 从VSTS运行编码的UI测试时出错

Visual studio 2015 从VSTS运行编码的UI测试时出错,visual-studio-2015,azure-devops,coded-ui-tests,Visual Studio 2015,Azure Devops,Coded Ui Tests,当我试图从VSTS运行编码的UI测试(Orderedtest1.orderedtest)时,在VsTest步骤中出现以下错误: ***Error Message: Error calling Initialization method for test class CodedUITestProject1.CodedUITest1: Microsoft.VisualStudio.TestTools.UITest.Extension.UITestException: To run tests

当我试图从VSTS运行编码的UI测试(Orderedtest1.orderedtest)时,在VsTest步骤中出现以下错误:

***Error Message:
Error calling Initialization method for test class 
CodedUITestProject1.CodedUITest1: 
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. For more information, see "How to: Set Up Your 
Test Agent to Run Tests That Interact with the Desktop" 
(http://go.microsoft.com/fwlink/?LinkId=255012)
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. For more information, 
see "How to: Configure and Run Scheduled Tests After Building Your 
Application" (http://go.microsoft.com/fwlink/?LinkId=254735)
Stack Trace:
at Microsoft.VisualStudio.TestTools.UITesting.Playback.Initialize()
at Microsoft.VisualStudio.TestTools.UITesting.CodedUITestExtensionExecution.Before
TestInitialize(Object sender, BeforeTestInitializeEventArgs e)
at Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestExecution.RaiseBeforeTestInitialize(BeforeTestInitializeEventArgs args)
at Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestExecuter.RunInitializeMethod()
Skipped  2- CodedUITestMethodB (OrderedTest1)***
操作系统(测试机):Windows 10 Pro(64位操作系统,基于x64的处理器) VS:Visual Studio Enterprise 2015及其更新3

生成定义详细信息如下所示:


我错过了上面的任何步骤吗?请帮助我解决生成失败问题。

您正在使用Visual Studio测试任务,该任务使用生成/发布代理运行测试,因此您需要将生成/发布配置为交互模式,以便运行编码的UI测试,因此请将其重新配置为交互模式


注意:如果代理停止,您可以在命令提示符(以管理员身份运行命令提示符)中调用
run.cmd
,否则无法关闭此窗口,否则代理将停止

您使用的是hosted agent还是private agent?它是private agent。它是否配置为以交互方式运行?