При попытке запуска тестов Coded UI на Azure самом размещенном агенте выдается следующая ошибка:
На машине агента установлена тестовая платформа VS, а также содержатся инструменты сборки VS2017 для запуска тестов Coded UI.
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.
В частности, сбойная задача - это тестовая задача Visual Studio (VSTest@2). Непосредственно перед этим шагом есть задача установки тестовой платформы Visual Studio (VisualStudioTestPlatformInstaller@1), которая настроена на использование самой последней тестовой платформы, доступной из nuget.
Тесты CodedUI создаются с использованием VS2017.
Это задачи yaml:
- 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'