Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/.net/21.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# Azure Devops-UI测试无法在自托管代理上运行_C#_.net_Azure Devops_Yaml - Fatal编程技术网

C# Azure Devops-UI测试无法在自托管代理上运行

C# Azure Devops-UI测试无法在自托管代理上运行,c#,.net,azure-devops,yaml,C#,.net,Azure Devops,Yaml,尝试在Azure自托管代理上运行编码的UI测试时,出现以下错误 代理计算机安装了VS测试平台,还包含用于运行编码ui测试的VS2017构建工具 Exception rethrown at [0]: at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) at System.Runtime.Remoting.Proxies.RealProxy.

尝试在Azure自托管代理上运行编码的UI测试时,出现以下错误

代理计算机安装了VS测试平台,还包含用于运行编码ui测试的VS2017构建工具

Exception rethrown at [0]: 
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at Microsoft.VisualStudio.TestPlatform.Core.ITestRunnerService.InitializeConnection(IEnumerable`1 pathToAdditionalExtensions, Boolean loadOnlyWellKnownExtensions)
   at Microsoft.VisualStudio.TestPlatform.Client.TestRunnerServiceProxy.InitializeConnection(IEnumerable`1 pathToAdditionalExtensions, Boolean loadOnlyWellKnownExtensions)
   at Microsoft.VisualStudio.TestPlatform.Client.TestRunnerServiceClient.TestConnection(Binding binding, EndpointAddress address, TestRunnerServiceProxy& proxy, Exception& exceptionDuringConnection)
   --- End of inner exception stack trace ---
   at Microsoft.VisualStudio.TestPlatform.Client.TestRunnerServiceClient.InitializeProxy()
   at Microsoft.VisualStudio.TestPlatform.Client.TestRunnerServiceClient.Initialize_NoLock(Boolean forceX86Discoverer)
   at Microsoft.VisualStudio.TestPlatform.Client.TestRunnerServiceClient.EnsureInitialized(Boolean forceX86Discoverer, Boolean shouldCheckForRelaunch)
   at Microsoft.VisualStudio.TestPlatform.Client.TestRunnerServiceClient.InvokeTestRunnerServiceAction(Boolean forceX86Discoverer, Action`1 action)
   at Microsoft.VisualStudio.TestPlatform.Client.TestRunnerServiceClient.DiscoverTests(IEnumerable`1 sources, String settings, Int64 frequencyOfDiscoveredTestEvent, ITestCaseDiscoveryLog testCaseDiscoveryLog, TimeSpan discoveredTestEventTimeout)
   at Microsoft.VisualStudio.TestPlatform.Client.Rocksteady.RocksteadyDiscoveryManager.DiscoverTestsForTestRun(DiscoveryCriteria discoveryCriteria, ITestDiscoveryEventsHandler eventHandler)
   at Microsoft.VisualStudio.TestPlatform.Client.DiscoveryRequest.Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.IDiscoveryRequest.DiscoverAsync()
   at Microsoft.VisualStudio.TestService.VstestAdapter.DiscoverTests.PerformDiscovery(TestAutomationRunSlice sliceDetails, IAddTestCasesToTcmRunHandler addTestCasesToTcmRunHandler, ExecutionStateContext stateModelContext)
   at Microsoft.VisualStudio.TestService.VstestAdapter.Execution.FetchPreviousPhaseData(ExecutionStateContext stateModelContext)
   at Microsoft.VisualStudio.TestService.VstestAdapter.ExecutionAndPublish.Run(ExecutionStateContext stateModelContext, CancellationToken cancellationToken)
   at System.Threading.Tasks.Task`1.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()<---

##[error]TestExecution encountered unexpected failures System.AggregateException: One or more errors occurred. ---> Microsoft.VisualStudio.TestPlatform.Common.TestRunner.TestPlatformException: Failed to initialize client proxy: could not connect to test process vstest.discoveryengine.x86.exe. ---> System.ServiceModel.EndpointNotFoundException: There was no endpoint listening at net.pipe://machineA/vstest.discoveryengine/15248 that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.

改变了CMD.EXE,运行在高昂的特权中,它总是启动代理。侦听器作为管理员解决了这个问题。

,考虑用失败的代码编辑您的问题。HI,使用YAML创建了一个管道,并且在运行配置的测试时它在任务上失败。没有编写代码,它是Azure Devops管道。至少我们需要看看您的测试方法代码是什么。。。。
  - task: VisualStudioTestPlatformInstaller@1
    displayName: 'Visual Studio Test Platform Installer'
    inputs:
      versionSelector: latestStable


  - task: VSTest@2
    displayName: 'CodedUI Tests'
    inputs:
      testSelector: 'testPlan'
      testPlan: '8369'
      testSuite: '8373'
      testConfiguration: '13'
      searchFolder: 'C:\Testing\bin\Tests'
      uiTests: true
      runSettingsFile: 'C:\Testing\bin\Tests\Solution Items\OurTestSettings.testsettings'
      runTestsInIsolation: true
      testRunTitle: 'Nightly Tests'