Test Agent Deployment v2 fails in TFS 2015 - tfs-2015

I am trying to set some VS tests to run remotely on a windows server machine. It downloads the needed artifacts to the target machine, but when trying to deploy the test agent, it fails with the following unclear error:
The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Exception calling ".ctor" with "2" argument(s): "One or more errors occurred."'. For troubleshooting, refer https://aka.ms/remotevstest.
I looked at the ps script runnning, namely TestAgentConfiguration.ps1 and it looks like it fails when trying to run this line
$DtaAgentClient = New-Object Microsoft.VisualStudio.TestService.Utility.TestExecutionServiceRestApiHelper -ArgumentList $TfsCollection, $PersonalAccessToken
However, I do have access to the TFS server from the target machine... any ideas?
Here is the entire log:
2017-12-12T13:38:04.7959295Z ##[section]Starting: Deploy TestAgent on
2017-12-12T13:38:04.8099296Z ==============================================================================
2017-12-12T13:38:04.8099296Z Task : Visual Studio Test Agent Deployment
2017-12-12T13:38:04.8109296Z Description : Deploy and configure Test Agent to run tests on a set of machines
2017-12-12T13:38:04.8109296Z Version : 2.1.8
2017-12-12T13:38:04.8109296Z Author : Microsoft Corporation
2017-12-12T13:38:04.8109296Z Help : [More Information](https://go.microsoft.com/fwlink/?LinkId=838890)
2017-12-12T13:38:04.8109296Z ==============================================================================
2017-12-12T13:38:08.9079295Z ****************************************************************
2017-12-12T13:38:08.9079295Z Task Input Information
2017-12-12T13:38:08.9079295Z ----------------------------------------------------------------
2017-12-12T13:38:08.9079295Z testMachineInput = x
2017-12-12T13:38:08.9079295Z adminUserName = x
2017-12-12T13:38:08.9079295Z winRmProtocal = Http
2017-12-12T13:38:08.9079295Z testCertificate = true
2017-12-12T13:38:08.9079295Z machineUserName = x
2017-12-12T13:38:08.9079295Z runAsProcess = false
2017-12-12T13:38:08.9079295Z logonAutomatically = false
2017-12-12T13:38:08.9079295Z disableScreenSaver = false
2017-12-12T13:38:08.9079295Z isDataCollectionOnly = false
2017-12-12T13:38:08.9079295Z testPlatform = 15.0
2017-12-12T13:38:08.9079295Z agentLocation =
2017-12-12T13:38:08.9079295Z updateTestAgent = false
2017-12-12T13:38:08.9079295Z ****************************************************************
2017-12-12T13:38:09.8859300Z Starting to deploy and configure test agent on test machines.
2017-12-12T13:38:09.8869298Z Inputs provided are:
2017-12-12T13:38:09.8869298Z Use HTTP Port: True
2017-12-12T13:38:09.8869298Z Username: x
2017-12-12T13:38:09.8869298Z Disable Screen saver: False
2017-12-12T13:38:09.8869298Z Login Automatically: False
2017-12-12T13:38:09.8869298Z Run as process: False
2017-12-12T13:38:09.8869298Z Agent would be downloaded from https://go.microsoft.com/fwlink/?LinkId=615472
2017-12-12T13:38:09.8869298Z Update test agent: False
2017-12-12T13:38:09.8869298Z Run test agent as DataCollection only : False
2017-12-12T13:38:10.3119286Z Task 'VerifyTestAgentInstalled' on machine 'x:5985' is being run
2017-12-12T13:38:15.1009298Z Task 'VerifyTestAgentInstalled' on machine 'x:5985' completed.
2017-12-12T13:38:15.1099303Z Deployment started on target machine...
2017-12-12T13:38:15.1099303Z
2017-12-12T13:38:15.1099303Z Query for Testplatfrom version: 15.0
2017-12-12T13:38:15.1099303Z
2017-12-12T13:38:15.1099303Z Testing container: 'REGISTRY::HKEY_CLASSES_ROOT\CLSID\{177F0C4A-1CD3-4DE7-A32C-71DBBB9FA36D}'
2017-12-12T13:38:15.1099303Z
2017-12-12T13:38:15.1099303Z Does not exist.
2017-12-12T13:38:15.1109292Z
2017-12-12T13:38:15.1109292Z Test Agent does not exists
2017-12-12T13:38:15.1109292Z
2017-12-12T13:38:15.1109292Z
2017-12-12T13:38:15.1109292Z RemoteDeployerSource Verbose: 2 : [RemoteDeployer][12:dec:17:14:38:11:8551; 1540, 4](NPSIIS2012R2-01)Created public key for communication
2017-12-12T13:38:15.1109292Z RemoteDeployerSource Information: 12 : [RemoteDeployer][12:dec:17:14:38:11:8551; 1540, 4](NPSIIS2012R2-01)Deployment service - VisualStudioRemoteDeployer6df0f6fb-f194-4fb7-97fa-d74cb1d363aa is running...
2017-12-12T13:38:15.1109292Z RemoteDeployerSource Verbose: 4 : [RemoteDeployer][12:dec:17:14:38:12:8862; 1540, 5](NPSIIS2012R2-01)Input file found
2017-12-12T13:38:15.1109292Z RemoteDeployerSource Verbose: 5 : [RemoteDeployer][12:dec:17:14:38:12:8862; 1540, 5](NPSIIS2012R2-01)Reading input parameters
2017-12-12T13:38:15.1109292Z RemoteDeployerSource Verbose: 6 : [RemoteDeployer][12:dec:17:14:38:12:8862; 1540, 5](NPSIIS2012R2-01)Finished reading input parameters
2017-12-12T13:38:15.1109292Z
2017-12-12T13:38:17.3459301Z Starting to download testagent
2017-12-12T13:38:17.3499295Z testagent is downloaded at: C:\TestAgent\58435510-14c6-40f3-ab6b-61fb7d45d0ed
2017-12-12T13:38:17.3499295Z Task 'CopyFilesToTestAgent' on machine 'x:5985' is being run
2017-12-12T13:38:17.3499295Z Task 'CopyFilesToTestAgent' on machine 'x:5985' completed.
2017-12-12T13:38:17.3499295Z
2017-12-12T13:38:17.3499295Z \\x was deleted successfully.
2017-12-12T13:38:17.3499295Z
2017-12-12T13:38:17.3509293Z Copying recursively from C:\TestAgent\58435510-14c6-40f3-ab6b-61fb7d45d0ed to C:\TestAgent on machine x succeeded.
2017-12-12T13:38:17.3509293Z
2017-12-12T13:38:17.3509293Z \\x was deleted successfully.
2017-12-12T13:38:17.3509293Z
2017-12-12T13:38:17.3509293Z
2017-12-12T13:39:17.1479291Z Task 'InstallTestAgent' on machine 'x:5985' is being run
2017-12-12T13:40:17.1549303Z Task 'InstallTestAgent' on machine 'x:5985' is taking time. Please Wait
2017-12-12T13:41:14.2969287Z Deployment started on target machine...
2017-12-12T13:41:14.2969287Z
2017-12-12T13:41:14.2969287Z Setup path: C:\TestAgent\vstf_testagent.exe
2017-12-12T13:41:14.2969287Z
2017-12-12T13:41:14.2969287Z Testing container: 'REGISTRY::HKEY_CLASSES_ROOT\CLSID\{177F0C4A-1CD3-4DE7-A32C-71DBBB9FA36D}'
2017-12-12T13:41:14.2969287Z
2017-12-12T13:41:14.2969287Z Does not exist.
2017-12-12T13:41:14.2969287Z
2017-12-12T13:41:14.2969287Z Installed Test Agent version: 0.0
2017-12-12T13:41:14.2969287Z
2017-12-12T13:41:14.2969287Z Requested Test Agent version: 15.5.27130
2017-12-12T13:41:14.2969287Z
2017-12-12T13:41:14.2969287Z Test Agent will be installed
2017-12-12T13:41:14.2969287Z
2017-12-12T13:41:14.2969287Z No test agent certificate found.
2017-12-12T13:41:14.2969287Z
2017-12-12T13:41:14.2969287Z Exit code from installation 0
2017-12-12T13:41:14.2969287Z
2017-12-12T13:41:14.2969287Z
2017-12-12T13:41:14.2969287Z RemoteDeployerSource Verbose: 2 : [RemoteDeployer][12:dec:17:14:39:17:8071; 2820, 4](x)Created public key for communication
2017-12-12T13:41:14.2969287Z RemoteDeployerSource Information: 12 : [RemoteDeployer][12:dec:17:14:39:17:8071; 2820, 4](x)Deployment service - VisualStudioRemoteDeployer38030956-3f0b-4c95-8984-02555aeeb5cf is running...
2017-12-12T13:41:14.2969287Z RemoteDeployerSource Verbose: 4 : [RemoteDeployer][12:dec:17:14:39:18:8259; 2820, 5](x)Input file found
2017-12-12T13:41:14.2969287Z RemoteDeployerSource Verbose: 5 : [RemoteDeployer][12:dec:17:14:39:18:8259; 2820, 5](x)Reading input parameters
2017-12-12T13:41:14.2969287Z RemoteDeployerSource Verbose: 6 : [RemoteDeployer][12:dec:17:14:39:18:8259; 2820, 5](x)Finished reading input parameters
2017-12-12T13:41:14.2969287Z
2017-12-12T13:41:14.2979294Z Task 'InstallTestAgent' on machine 'x:5985' completed.
2017-12-12T13:41:14.5299296Z Task 'CopyFilesToTestAgent' on machine 'x:5985' is being run
2017-12-12T13:41:14.9079281Z
2017-12-12T13:41:14.9079281Z \\x was deleted successfully.
2017-12-12T13:41:14.9079281Z
2017-12-12T13:41:14.9079281Z Copying recursively from C:\Builds2015\agent2\_work\_tasks\DeployVisualStudioTestAgent_52a38a6a-1517-41d7-96cc-73ee0c60d2b6\2.1.8\TestExecution.zip to C:\TestAgent on machine x succeeded.
2017-12-12T13:41:14.9079281Z
2017-12-12T13:41:14.9089280Z \\x was deleted successfully.
2017-12-12T13:41:14.9089280Z
2017-12-12T13:41:14.9089280Z
2017-12-12T13:41:14.9089280Z Task 'CopyFilesToTestAgent' on machine 'x:5985' completed.
2017-12-12T13:41:14.9323708Z Task 'TestAgentConfiguration' on machine 'x:5985' is being run
2017-12-12T13:42:10.9609296Z RemoteDeployerSource Verbose: 2 : [RemoteDeployer][12:dec:17:14:41:15:5500; 3360, 4](x)Created public key for communication
2017-12-12T13:42:10.9609296Z RemoteDeployerSource Information: 12 : [RemoteDeployer][12:dec:17:14:41:15:5500; 3360, 4](x)Deployment service - VisualStudioRemoteDeployerd005bda2-0ecf-4c84-9457-612a290bec8a is running...
2017-12-12T13:42:10.9609296Z RemoteDeployerSource Verbose: 4 : [RemoteDeployer][12:dec:17:14:41:16:5705; 3360, 5](x)Input file found
2017-12-12T13:42:10.9609296Z RemoteDeployerSource Verbose: 5 : [RemoteDeployer][12:dec:17:14:41:16:5705; 3360, 5](x)Reading input parameters
2017-12-12T13:42:10.9609296Z RemoteDeployerSource Verbose: 6 : [RemoteDeployer][12:dec:17:14:41:16:5705; 3360, 5](x)Finished reading input parameters
2017-12-12T13:42:10.9609296Z
2017-12-12T13:42:10.9609296Z Task 'TestAgentConfiguration' on machine 'x:5985' completed.
2017-12-12T13:42:10.9609296Z ##[warning]Task 'TestAgentConfiguration' for machine x:5985's Error : System.Exception: The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Exception calling ".ctor" with "2" argument(s): "One or more errors occurred."
2017-12-12T13:42:10.9619289Z ##[warning]Task 'TestAgentConfiguration' for machine x:5985's Log :
2017-12-12T13:42:10.9619289Z Deployment started on target machine...
2017-12-12T13:42:10.9619289Z
2017-12-12T13:42:10.9619289Z System.AggregateException: Failed to execute the powershell script. Consult the logs below for details of the error.
2017-12-12T13:42:10.9619289Z The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Exception calling ".ctor" with "2" argument(s): "One or more errors occurred." ---> System.Management.Automation.ActionPreferenceStopException: The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Exception calling ".ctor" with "2" argument(s): "One or more errors occurred."
2017-12-12T13:42:10.9619289Z at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input)
2017-12-12T13:42:10.9619289Z at System.Management.Automation.PowerShell.Worker.ConstructPipelineAndDoWork(Runspace rs, Boolean performSyncInvoke)
2017-12-12T13:42:10.9619289Z at System.Management.Automation.PowerShell.Worker.CreateRunspaceIfNeededAndDoWork(Runspace rsToUse, Boolean isSync)
2017-12-12T13:42:10.9619289Z at System.Management.Automation.PowerShell.CoreInvokeHelper[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
2017-12-12T13:42:10.9619289Z at System.Management.Automation.PowerShell.CoreInvoke[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
2017-12-12T13:42:10.9619289Z at System.Management.Automation.PowerShell.Invoke(IEnumerable input, PSInvocationSettings settings)
2017-12-12T13:42:10.9619289Z at Microsoft.VisualStudio.Services.DevTestLabs.RemoteDeployer.Deployment.PowershellExecutor.<>c__DisplayClass28_0.<Invoke>b__0()
2017-12-12T13:42:10.9619289Z at Microsoft.VisualStudio.Services.DevTestLabs.RemoteDeployer.Utilities.RetryExecutor.<>c__DisplayClass19_0`1.<Execute>b__0()
2017-12-12T13:42:10.9619289Z at Microsoft.VisualStudio.Services.DevTestLabs.RemoteDeployer.Utilities.RetryExecutor.Execute(Action action)
2017-12-12T13:42:10.9619289Z at Microsoft.VisualStudio.Services.DevTestLabs.RemoteDeployer.Utilities.RetryExecutor.Execute[T](Func`1 action)
2017-12-12T13:42:10.9629284Z at Microsoft.VisualStudio.Services.DevTestLabs.RemoteDeployer.Deployment.PowershellExecutor.Invoke(String errorContextMessage, Boolean writeResultToLog, Boolean isCancellable, ActionPreference errorActionPreference)
2017-12-12T13:42:10.9629284Z --- End of inner exception stack trace ---
2017-12-12T13:42:10.9629284Z at Microsoft.VisualStudio.Services.DevTestLabs.RemoteDeployer.Deployment.PowershellExecutor.Invoke(String errorContextMessage, Boolean writeResultToLog, Boolean isCancellable, ActionPreference errorActionPreference)
2017-12-12T13:42:10.9629284Z at Microsoft.VisualStudio.Services.DevTestLabs.RemoteDeployer.Deployment.ScriptExecutor.ExecuteScript(IPowerShell powerShell, String script, String arguments, Boolean isScriptDotSourced, Boolean useHttp)
2017-12-12T13:42:10.9629284Z at Microsoft.VisualStudio.Services.DevTestLabs.RemoteDeployer.Deployment.DeploymentService.RunPowerShellScripts(DeploymentMachineSpecification deploymentMachine, ScriptSpecification scriptSpecification, ScriptSpecification initializationScriptSpecification, String applicationPath, IPowerShell powerShellSession)
2017-12-12T13:42:10.9639291Z ---> (Inner Exception #0) System.Management.Automation.ActionPreferenceStopException: The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Exception calling ".ctor" with "2" argument(s): "One or more errors occurred."
2017-12-12T13:42:10.9639291Z at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input)
2017-12-12T13:42:10.9639291Z at System.Management.Automation.PowerShell.Worker.ConstructPipelineAndDoWork(Runspace rs, Boolean performSyncInvoke)
2017-12-12T13:42:10.9639291Z at System.Management.Automation.PowerShell.Worker.CreateRunspaceIfNeededAndDoWork(Runspace rsToUse, Boolean isSync)
2017-12-12T13:42:10.9639291Z at System.Management.Automation.PowerShell.CoreInvokeHelper[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
2017-12-12T13:42:10.9649298Z at System.Management.Automation.PowerShell.CoreInvoke[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
2017-12-12T13:42:10.9649298Z at System.Management.Automation.PowerShell.Invoke(IEnumerable input, PSInvocationSettings settings)
2017-12-12T13:42:10.9649298Z at Microsoft.VisualStudio.Services.DevTestLabs.RemoteDeployer.Deployment.PowershellExecutor.<>c__DisplayClass28_0.<Invoke>b__0()
2017-12-12T13:42:10.9649298Z at Microsoft.VisualStudio.Services.DevTestLabs.RemoteDeployer.Utilities.RetryExecutor.<>c__DisplayClass19_0`1.<Execute>b__0()
2017-12-12T13:42:10.9649298Z at Microsoft.VisualStudio.Services.DevTestLabs.RemoteDeployer.Utilities.RetryExecutor.Execute(Action action)
2017-12-12T13:42:10.9649298Z at Microsoft.VisualStudio.Services.DevTestLabs.RemoteDeployer.Utilities.RetryExecutor.Execute[T](Func`1 action)
2017-12-12T13:42:10.9649298Z at Microsoft.VisualStudio.Services.DevTestLabs.RemoteDeployer.Deployment.PowershellExecutor.Invoke(String errorContextMessage, Boolean writeResultToLog, Boolean isCancellable, ActionPreference errorActionPreference)<---
2017-12-12T13:42:10.9649298Z Testing container: 'REGISTRY::HKEY_CLASSES_ROOT\CLSID\{177F0C4A-1CD3-4DE7-A32C-71DBBB9FA36D}'
2017-12-12T13:42:10.9649298Z
2017-12-12T13:42:10.9649298Z Exists.
2017-12-12T13:42:10.9649298Z
2017-12-12T13:42:10.9649298Z Getting Visual Studio setup instances.
2017-12-12T13:42:10.9649298Z
2017-12-12T13:42:10.9649298Z Found 1 instances.
2017-12-12T13:42:10.9649298Z
2017-12-12T13:42:10.9649298Z
2017-12-12T13:42:10.9649298Z
2017-12-12T13:42:10.9649298Z Description : Supports running automated tests and load tests remotely
2017-12-12T13:42:10.9649298Z DisplayName : Visual Studio Test Agent 2017
2017-12-12T13:42:10.9649298Z Id : 48324a16
2017-12-12T13:42:10.9659298Z InstallDate : System.Runtime.InteropServices.ComTypes.FILETIME
2017-12-12T13:42:10.9659298Z Name : VisualStudio/15.5.1+27130.2003
2017-12-12T13:42:10.9659298Z Path : C:\TestAgent2017
2017-12-12T13:42:10.9659298Z Version : 15.5.27130.2003
2017-12-12T13:42:10.9659298Z VersionString : 15.5.27130.2003
2017-12-12T13:42:10.9659298Z
2017-12-12T13:42:10.9659298Z
2017-12-12T13:42:10.9659298Z
2017-12-12T13:42:10.9659298Z
2017-12-12T13:42:10.9659298Z
2017-12-12T13:42:10.9659298Z VS path C:\TestAgent2017\Common7\IDE; Test window path C:\TestAgent2017\Common7\IDE\CommonExtensions\Microsoft\TestWindow
2017-12-12T13:42:10.9659298Z
2017-12-12T13:42:10.9659298Z Path: C:\TestAgent\TfsAssemblies\Newtonsoft.Json.dll
2017-12-12T13:42:10.9659298Z
2017-12-12T13:42:10.9659298Z Loading module from path 'C:\TestAgent\TfsAssemblies\Newtonsoft.Json.dll'.
2017-12-12T13:42:10.9659298Z
2017-12-12T13:42:10.9659298Z Loading module from path 'C:\TestAgent\TfsAssemblies\System.Net.Http.Formatting.dll'.
2017-12-12T13:42:10.9659298Z
2017-12-12T13:42:10.9659298Z Loading module from path 'C:\TestAgent\TfsAssemblies\Microsoft.TeamFoundation.DistributedTask.Task.TestExecution.dll'.
2017-12-12T13:42:10.9659298Z
2017-12-12T13:42:10.9659298Z Loading module from path 'C:\TestAgent\TfsAssemblies\Microsoft.TeamFoundation.Common.dll'.
2017-12-12T13:42:10.9659298Z
2017-12-12T13:42:10.9669287Z Loading module from path 'C:\TestAgent\TfsAssemblies\Microsoft.TeamFoundation.Test.WebApi.dll'.
2017-12-12T13:42:10.9669287Z
2017-12-12T13:42:10.9669287Z Loading module from path 'C:\TestAgent\TfsAssemblies\Microsoft.VisualStudio.Services.Common.dll'.
2017-12-12T13:42:10.9669287Z
2017-12-12T13:42:10.9669287Z Loading module from path 'C:\TestAgent\TfsAssemblies\Microsoft.VisualStudio.Services.WebApi.dll'.
2017-12-12T13:42:10.9669287Z
2017-12-12T13:42:10.9669287Z Loading module from path 'C:\TestAgent\PrivateAssemblies\MS.VS.TestService.Client.Utility.dll'.
2017-12-12T13:42:10.9669287Z
2017-12-12T13:42:10.9669287Z ****************************************************************
2017-12-12T13:42:10.9669287Z
2017-12-12T13:42:10.9669287Z Configure Test Agent
2017-12-12T13:42:10.9669287Z
2017-12-12T13:42:10.9669287Z ----------------------------------------------------------------
2017-12-12T13:42:10.9669287Z
2017-12-12T13:42:10.9669287Z SetupPath : (C:\TestAgent)
2017-12-12T13:42:10.9669287Z
2017-12-12T13:42:10.9669287Z TestUserName : (x)
2017-12-12T13:42:10.9669287Z
2017-12-12T13:42:10.9669287Z TfsCollection : (x)
2017-12-12T13:42:10.9679288Z
2017-12-12T13:42:10.9679288Z AsServiceOrProcess : (Service)
2017-12-12T13:42:10.9679288Z
2017-12-12T13:42:10.9679288Z EnvironmentUrl : (x)
2017-12-12T13:42:10.9679288Z
2017-12-12T13:42:10.9679288Z MachineName : (x)
2017-12-12T13:42:10.9679288Z
2017-12-12T13:42:10.9679288Z Capabilities : ()
2017-12-12T13:42:10.9679288Z
2017-12-12T13:42:10.9679288Z TestAgentVersion : (15.0)
2017-12-12T13:42:10.9679288Z
2017-12-12T13:42:10.9679288Z ****************************************************************
2017-12-12T13:42:10.9679288Z
2017-12-12T13:42:10.9679288Z
2017-12-12T13:42:10.9679288Z ##[error]Error occured on 'x:5985'. Details : 'The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Exception calling ".ctor" with "2" argument(s): "One or more errors occurred."'. For troubleshooting, refer https://aka.ms/remotevstest.
2017-12-12T13:42:11.0919296Z ##[section]Finishing: Deploy TestAgent on

Update:
The current version Visual Studio Test Agent Deployment (v2) which you are using is supported with TFS 2017 onwards.
Since Test agent 2017 is only support with TAD v2 , so you have to update your TFS server version such as TFS2017update3. Otherwise, you need rollback to TAD v1 and use Test Agent 2015.
Also take a look at prawalagarwal's comment in this similar question: Run tests tasks failing after Deploy Agent task
Besides please notice, Visual Studio Test Agent Deployment task requires the target computer to have:
Windows 7 Service Pack 1 or Windows 2008 R2 Service Pack 2 or higher
.NET 4.5 or higher
PSRemoting enabled by running the Enable-PSRemoting PowerShell script
.

Related

TFS 2017 Test Task Version 2 unable to get Feature Flag warnings

Recently started getting the following warnings from my VsTest task Version 2 (Version 1 does NOT produce the warnings) after the build machine completes a (TFS2017) build:
Unable to get feature flag: TestExecution.EnableTranslationApi
Unable to get feature flag: TestExecution.EnableDiagnostics
I created a simple build definition that has a VsTest task, but doesn't even have any tests and i get the same issue. Here's its log:
2019-05-15T17:42:14.4932509Z ##[section]Starting: VsTest - testAssemblies
2019-05-15T17:42:14.4943225Z ==============================================================================
2019-05-15T17:42:14.4943357Z Task : Visual Studio Test
2019-05-15T17:42:14.4943570Z Description : Run unit and functional tests (Selenium, Appium, Coded UI test, etc.) using the Visual Studio Test (VsTest) runner. Test frameworks that have a Visual Studio test adapter such as MsTest, xUnit, NUnit, Chutzpah (for JavaScript tests using QUnit, Mocha and Jasmine), etc. can be run. Tests can be distributed on multiple agents using this task (version 2).
2019-05-15T17:42:14.4943768Z Version : 2.145.0
2019-05-15T17:42:14.4943871Z Author : Microsoft Corporation
2019-05-15T17:42:14.4943976Z Help : [More information](https://go.microsoft.com/fwlink/?LinkId=835764)
2019-05-15T17:42:14.4944089Z ==============================================================================
2019-05-15T17:42:21.2906431Z SystemVssConnection exists true
2019-05-15T17:42:21.3711041Z ##[warning]Unable to get feature flag: TestExecution.EnableTranslationApi
2019-05-15T17:42:21.5124738Z SystemVssConnection exists true
2019-05-15T17:42:21.5301824Z ##[warning]Unable to get feature flag: TestExecution.EnableDiagnostics
2019-05-15T17:42:21.6498462Z Running tests using vstest.console.exe runner.
2019-05-15T17:42:21.6608055Z ======================================================
2019-05-15T17:42:21.6783692Z Test selector : Test assemblies
2019-05-15T17:42:21.6811412Z Test filter criteria : null
2019-05-15T17:42:21.7076165Z Search folder : D:\Agent02\_work\5\s
2019-05-15T17:42:21.8323849Z VisualStudio version selected for test execution : latest
2019-05-15T17:42:25.9981965Z Run in parallel : false
2019-05-15T17:42:25.9982368Z Run in isolation : false
2019-05-15T17:42:25.9982730Z Path to custom adapters : null
2019-05-15T17:42:25.9983384Z Other console options : null
2019-05-15T17:42:25.9983727Z Code coverage enabled : false
2019-05-15T17:42:25.9983845Z Diagnostics enabled : false
2019-05-15T17:42:25.9984208Z SystemVssConnection exists true
2019-05-15T17:42:25.9985363Z Run the tests locally using vstest.console.exe
2019-05-15T17:42:25.9985487Z ========================================================
2019-05-15T17:42:25.9985644Z Test selector : Test assemblies
2019-05-15T17:42:25.9985820Z Test assemblies : **\release\*test*.dll,!**\obj\**
2019-05-15T17:42:25.9985973Z Test filter criteria : null
2019-05-15T17:42:25.9986123Z Search folder : D:\Agent02\_work\5\s
2019-05-15T17:42:25.9986291Z Run settings file : D:\Agent02\_work\5\s
2019-05-15T17:42:25.9986492Z Run in parallel : false
2019-05-15T17:42:25.9986654Z Run in isolation : false
2019-05-15T17:42:25.9988401Z Path to custom adapters : null
2019-05-15T17:42:25.9988814Z Other console options : null
2019-05-15T17:42:25.9989201Z Code coverage enabled : false
2019-05-15T17:42:25.9989420Z Diagnostics enabled : false
2019-05-15T17:42:25.9990350Z Rerun failed tests: false
2019-05-15T17:42:25.9990938Z VisualStudio version selected for test execution : latest
2019-05-15T17:42:26.0399542Z ========================================================
2019-05-15T17:42:32.5917477Z ##[warning]No test assemblies found matching the pattern: **\release\*test*.dll,!**\obj\**.
2019-05-15T17:42:32.5917841Z ======================================================
2019-05-15T17:42:32.7510424Z ##[section]Finishing: VsTest - testAssemblies
What is this warning trying to tell me, and how can i fix it?

VSTS Release Management: Visual Studio Test Task

We have a release definition setup within VSTS with a Visual Studio Test task to run our automated test suite. The problem we're experiencing is that the release is succeeding regardless of whether there are failing tests or not. There doesn't appear to be any control within the task configuration over the behaviour of error handling/test failures.
Does anybody have any workarounds or solutions for what we're trying to achieve?
Thanks.
UPDATE
Release Logs:
2018-04-10T07:50:31.6993593Z ##[section]Starting: Execute Automated Tests
2018-04-10T07:50:31.6999650Z ==============================================================================
2018-04-10T07:50:31.6999764Z Task : Visual Studio Test
2018-04-10T07:50:31.6999919Z Description : Run unit and functional tests (Selenium, Appium, Coded UI test, etc.) using the Visual Studio Test runner. Test frameworks that have a Visual Studio test adapter such as xUnit, NUnit, Chutzpah, etc. can also be run. Tests can be distributed on multiple agents using this task (version 2).
2018-04-10T07:50:31.7000100Z Version : 2.3.28
2018-04-10T07:50:31.7000183Z Author : Microsoft Corporation
2018-04-10T07:50:31.7000292Z Help : [More Information](https://go.microsoft.com/fwlink/?LinkId=835764)
2018-04-10T07:50:31.7000391Z ==============================================================================
2018-04-10T07:50:32.4137415Z Run the tests locally using vstest.console.exe
2018-04-10T07:50:32.4137720Z ========================================================
2018-04-10T07:50:32.4137953Z Test selector : Test assemblies
2018-04-10T07:50:32.4138095Z Test assemblies : **\V6TestAutomation.dll
2018-04-10T07:50:32.4138483Z Test filter criteria : null
2018-04-10T07:50:32.4138620Z Search folder : D:\a\r1\a
2018-04-10T07:50:32.4138759Z Run settings file : D:\a\r1\a
2018-04-10T07:50:32.4138932Z Run in parallel : false
2018-04-10T07:50:32.4139050Z Run in isolation : false
2018-04-10T07:50:32.4139740Z Path to custom adapters : D:\a\r1\a\Test Automation\packages
2018-04-10T07:50:32.4139868Z Other console options : null
2018-04-10T07:50:32.4140002Z Code coverage enabled : false
2018-04-10T07:50:32.4140402Z Rerun failed tests: true
2018-04-10T07:50:32.4140572Z Rerun failed tests threshold: 30
2018-04-10T07:50:32.4140686Z Rerun maximum attempts: 3
2018-04-10T07:50:32.4140862Z VisualStudio version selected for test execution : latest
2018-04-10T07:50:33.9447744Z ========================================================
2018-04-10T07:50:34.1691886Z SystemVssConnection exists true
2018-04-10T07:50:34.1694146Z [command]D:\a\_tasks\VSTest_ef087383-ee5e-42c7-9a53-ab56c98420f9\2.3.28\Modules\DTAExecutionHost.exe
2018-04-10T07:50:36.9541002Z ##########################################################################
2018-04-10T07:50:37.1168390Z Starting TestExecution Model...
2018-04-10T07:50:46.8510175Z **************** Starting test execution *********************
2018-04-10T07:50:46.8510636Z [command]C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe #C:\Users\VSSADM~1\AppData\Local\Temp\d9500801-3c93-11e8-bd28-bd9645a0d16e.txt
2018-04-10T07:50:51.7078146Z Microsoft (R) Test Execution Command Line Tool Version 15.6.0
2018-04-10T07:50:51.7078766Z Copyright (c) Microsoft Corporation. All rights reserved.
2018-04-10T07:50:51.8463454Z vstest.console.exe
2018-04-10T07:50:51.8463809Z "D:\a\r1\a\Test Automation\bin\V6TestAutomation.dll"
2018-04-10T07:50:51.8464039Z /logger:"trx"
2018-04-10T07:50:51.8464255Z /TestAdapterPath:"D:\a\r1\a\Test Automation\packages"
2018-04-10T07:50:55.2887935Z Starting test execution, please wait...
2018-04-10T07:50:58.9435629Z SpecFlow+Runner execution started
2018-04-10T07:50:59.9152811Z SpecRun: running tests in D:\a\r1\a\Test Automation\bin\V6TestAutomation.dll
2018-04-10T07:50:59.9153503Z Profile: Results
2018-04-10T07:51:00.3834652Z Discovering target: Default
2018-04-10T07:51:00.3834868Z Discovering tests from assembly: D:\a\r1\a\Test Automation\bin\V6TestAutomation.dll
2018-04-10T07:51:04.1966900Z Starting ChromeDriver 2.37.543627 (63642262d9fb93fb4ab52398be4286d844092a5e) on port 1675
2018-04-10T07:51:04.1967270Z Only local connections are allowed.
2018-04-10T07:51:13.5791284Z Scenario: Create Record in TestTableExplorer -> Failed on thread #0
2018-04-10T07:51:13.5863835Z ##[error] [ERROR] no such element: Unable to locate element: {"method":"id","selector":"serialNumber"}
2018-04-10T07:51:13.5915120Z ##[error] (Session info: chrome=65.0.3325.181)
2018-04-10T07:51:13.5917595Z ##[error] (Driver info: chromedriver=2.37.543627 (63642262d9fb93fb4ab52398be4286d844092a5e),platform=Windows NT 10.0.14393 x86_64)
2018-04-10T07:51:13.5919630Z Failed Create Record
2018-04-10T07:51:13.5919860Z Error Message:
2018-04-10T07:51:13.5920023Z no such element: Unable to locate element: {"method":"id","selector":"serialNumber"}
2018-04-10T07:51:13.5920218Z (Session info: chrome=65.0.3325.181)
2018-04-10T07:51:13.5920384Z (Driver info: chromedriver=2.37.543627 (63642262d9fb93fb4ab52398be4286d844092a5e),platform=Windows NT 10.0.14393 x86_64)
2018-04-10T07:51:13.5920571Z Stack Trace:
2018-04-10T07:51:13.5920736Z OpenQA.Selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"id","selector":"serialNumber"}
2018-04-10T07:51:13.5920924Z (Session info: chrome=65.0.3325.181)
2018-04-10T07:51:13.5921110Z (Driver info: chromedriver=2.37.543627 (63642262d9fb93fb4ab52398be4286d844092a5e),platform=Windows NT 10.0.14393 x86_64)
2018-04-10T07:51:13.5921294Z at OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse)
2018-04-10T07:51:13.5921463Z at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
2018-04-10T07:51:13.5921666Z at OpenQA.Selenium.Remote.RemoteWebDriver.FindElement(String mechanism, String value)
2018-04-10T07:51:13.5921829Z at OpenQA.Selenium.Remote.RemoteWebDriver.FindElementById(String id)
2018-04-10T07:51:13.5922006Z at OpenQA.Selenium.By.<>c__DisplayClass16_0.<Id>b__0(ISearchContext context)
2018-04-10T07:51:13.5922164Z at OpenQA.Selenium.By.FindElement(ISearchContext context)
2018-04-10T07:51:13.5922735Z at OpenQA.Selenium.Remote.RemoteWebDriver.FindElement(By by)
2018-04-10T07:51:13.5923027Z at V6TestAutomation.Areas.TestTableExplorer.TestTableExplorerSteps.WhenICreateARecord() in D:\a\1\s\V6TestAutomation\Areas\TestTableExplorer\TestTableExplorerSteps.cs:line 52
2018-04-10T07:51:13.5923250Z at lambda_method(Closure , IContextManager )
2018-04-10T07:51:13.5923463Z at TechTalk.SpecFlow.Bindings.BindingInvoker.InvokeBinding(IBinding binding, IContextManager contextManager, Object[] arguments, ITestTracer testTracer, TimeSpan& duration)
2018-04-10T07:51:13.5924073Z at TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStepMatch(BindingMatch match, Object[] arguments)
2018-04-10T07:51:13.5924298Z at TechTalk.SpecRun.SpecFlowPlugin.Runtime.RunnerTestExecutionEngine.ExecuteStepMatch(BindingMatch match, Object[] arguments)
2018-04-10T07:51:13.5924540Z at TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStep(IContextManager contextManager, StepInstance stepInstance)
2018-04-10T07:51:13.5924743Z at TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.OnAfterLastStep()
2018-04-10T07:51:13.5924929Z at TechTalk.SpecFlow.TestRunner.CollectScenarioErrors()
2018-04-10T07:51:13.5925145Z at V6TestAutomation.Areas.TestTableExplorer.TestTableExplorerFeature.ScenarioCleanup()
2018-04-10T07:51:13.5925381Z at V6TestAutomation.Areas.TestTableExplorer.TestTableExplorerFeature.CreateRecord() in D:\a\1\s\V6TestAutomation\Areas\TestTableExplorer\TestTableExplorer.feature:line 10
2018-04-10T07:51:13.5925639Z at TechTalk.SpecRun.Framework.TaskExecutors.StaticOrInstanceMethodExecutor.ExecuteInternal(ITestThreadExecutionContext testThreadExecutionContext)
2018-04-10T07:51:13.5926381Z at TechTalk.SpecRun.Framework.TaskExecutors.StaticOrInstanceMethodExecutor.Execute(ITestThreadExecutionContext testThreadExecutionContext)
2018-04-10T07:51:13.5926594Z at TechTalk.SpecRun.Framework.TestAssemblyExecutor.ExecuteTestNodeTask(TestNode testNode, ITaskExecutor task, TraceEventType eventType)
** OMITTED FOR SIMPLICITY **
2018-04-10T07:51:16.0337874Z Standard Output Messages:
2018-04-10T07:51:16.0338025Z Given the test table explorer page is displayed
2018-04-10T07:51:16.0338210Z -> done: TestTableExplorerSteps.GivenTheTestTableExplorerPageIsDisplayed() (0.7s)
2018-04-10T07:51:16.0338368Z
2018-04-10T07:51:16.0338510Z And a record exists in the records table
2018-04-10T07:51:16.0338697Z -> error: no such element: Unable to locate element: {"method":"id","selector":"serialNumber"}
2018-04-10T07:51:16.0338864Z -> (Session info: chrome=65.0.3325.181)
2018-04-10T07:51:16.0339035Z -> (Driver info: chromedriver=2.37.543627 (63642262d9fb93fb4ab52398be4286d844092a5e),platform=Windows NT 10.0.14393 x86_64)
2018-04-10T07:51:16.0339209Z
2018-04-10T07:51:16.0339345Z When I delete a record
2018-04-10T07:51:16.0339491Z -> skipped because of previous errors
2018-04-10T07:51:16.0339647Z
2018-04-10T07:51:16.0339793Z Then the record is not displayed in the records table
2018-04-10T07:51:16.0339955Z -> skipped because of previous errors
2018-04-10T07:51:16.0340118Z Standard Error Messages:
2018-04-10T07:51:16.0340454Z no such element: Unable to locate element: {"method":"id","selector":"serialNumber"}
2018-04-10T07:51:16.0340705Z (Session info: chrome=65.0.3325.181)
2018-04-10T07:51:16.0340935Z (Driver info: chromedriver=2.37.543627 (63642262d9fb93fb4ab52398be4286d844092a5e),platform=Windows NT 10.0.14393 x86_64) OpenQA.Selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"id","selector":"serialNumber"}
2018-04-10T07:51:16.0341397Z (Session info: chrome=65.0.3325.181)
2018-04-10T07:51:16.0341607Z (Driver info: chromedriver=2.37.543627 (63642262d9fb93fb4ab52398be4286d844092a5e),platform=Windows NT 10.0.14393 x86_64)
2018-04-10T07:51:16.0342023Z at OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse)
2018-04-10T07:51:16.0342779Z at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
2018-04-10T07:51:16.0343045Z at OpenQA.Selenium.Remote.RemoteWebDriver.FindElement(String mechanism, String value)
2018-04-10T07:51:16.0343244Z at OpenQA.Selenium.Remote.RemoteWebDriver.FindElementById(String id)
2018-04-10T07:51:16.0343450Z at OpenQA.Selenium.By.<>c__DisplayClass16_0.<Id>b__0(ISearchContext context)
2018-04-10T07:51:16.0343659Z at OpenQA.Selenium.By.FindElement(ISearchContext context)
2018-04-10T07:51:16.0343844Z at OpenQA.Selenium.Remote.RemoteWebDriver.FindElement(By by)
2018-04-10T07:51:16.0344068Z at V6TestAutomation.Areas.TestTableExplorer.TestTableExplorerSteps.WhenICreateARecord() in D:\a\1\s\V6TestAutomation\Areas\TestTableExplorer\TestTableExplorerSteps.cs:line 52
2018-04-10T07:51:16.0344295Z at lambda_method(Closure , IContextManager )
2018-04-10T07:51:16.0344530Z at TechTalk.SpecFlow.Bindings.BindingInvoker.InvokeBinding(IBinding binding, IContextManager contextManager, Object[] arguments, ITestTracer testTracer, TimeSpan& duration)
2018-04-10T07:51:16.0344900Z at TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStepMatch(BindingMatch match, Object[] arguments)
2018-04-10T07:51:16.0345120Z at TechTalk.SpecRun.SpecFlowPlugin.Runtime.RunnerTestExecutionEngine.ExecuteStepMatch(BindingMatch match, Object[] arguments)
2018-04-10T07:51:16.0345350Z at TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStep(IContextManager contextManager, StepInstance stepInstance)
2018-04-10T07:51:16.0345574Z at TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.OnAfterLastStep()
2018-04-10T07:51:16.0345762Z at TechTalk.SpecFlow.TestRunner.CollectScenarioErrors()
2018-04-10T07:51:16.0345972Z at V6TestAutomation.Areas.TestTableExplorer.TestTableExplorerFeature.ScenarioCleanup()
2018-04-10T07:51:16.0346352Z at V6TestAutomation.Areas.TestTableExplorer.TestTableExplorerFeature.DeleteRecord() in D:\a\1\s\V6TestAutomation\Areas\TestTableExplorer\TestTableExplorer.feature:line 17
2018-04-10T07:51:16.0346583Z at TechTalk.SpecRun.Framework.TaskExecutors.StaticOrInstanceMethodExecutor.ExecuteInternal(ITestThreadExecutionContext testThreadExecutionContext)
2018-04-10T07:51:16.0347340Z at TechTalk.SpecRun.Framework.TaskExecutors.StaticOrInstanceMethodExecutor.Execute(ITestThreadExecutionContext testThreadExecutionContext)
2018-04-10T07:51:16.0347580Z at TechTalk.SpecRun.Framework.TestAssemblyExecutor.ExecuteTestNodeTask(TestNode testNode, ITaskExecutor task, TraceEventType eventType)
2018-04-10T07:51:25.4504774Z Result: 2 failed
2018-04-10T07:51:25.4505328Z Total: 39
2018-04-10T07:51:25.4506188Z Succeeded: 0
2018-04-10T07:51:25.4510416Z Ignored: 37
2018-04-10T07:51:25.4511014Z Pending: 0
2018-04-10T07:51:25.4511308Z Skipped: 0
2018-04-10T07:51:25.4511584Z Failed: 2
2018-04-10T07:51:25.4511843Z Execution Time: 00:00:14.4039087
2018-04-10T07:51:25.4512174Z Report file: file:///D:\a\r1\a\TestResults\V6TestAutomation_Results_2018-04-10T075100.html
2018-04-10T07:51:25.4513035Z Log file: file:///D:\a\r1\a\TestResults\V6TestAutomation_Results_2018-04-10T075100.log
2018-04-10T07:51:25.4513325Z SpecFlow+Runner execution finished
2018-04-10T07:51:26.7860424Z Attachments:
2018-04-10T07:51:26.7861290Z C:\Users\VssAdministrator\AppData\Local\Temp\gxkaqztp.ujc\V6TestAutomation_Results_2018-04-10T075100.log
2018-04-10T07:51:26.7861672Z C:\Users\VssAdministrator\AppData\Local\Temp\gxkaqztp.ujc\V6TestAutomation_Results_2018-04-10T075100.html
2018-04-10T07:51:26.7862366Z Total tests: 39. Passed: 0. Failed: 2. Skipped: 37.
2018-04-10T07:51:26.7863031Z ##[error]Test Run Failed.
2018-04-10T07:51:26.7865279Z Test execution time: 28.6017 Seconds
2018-04-10T07:51:27.7157854Z Results File: D:\a\r1\a\TestResults\VssAdministrator_factoryvm-az261_2018-04-10_07_51_13.trx
2018-04-10T07:51:27.7162409Z **************** Completed test execution *********************
2018-04-10T07:51:27.7163247Z Test results files: D:\a\r1\a\TestResults\VssAdministrator_factoryvm-az261_2018-04-10_07_51_13.trx
2018-04-10T07:51:27.7789456Z Created test run: 450
2018-04-10T07:51:27.7790908Z Publishing test results: 39
2018-04-10T07:51:27.7846686Z Publishing test results to test run '450'.
2018-04-10T07:51:27.7875023Z Test results remaining: 39. Test run id: 450.
2018-04-10T07:51:28.8790810Z Published test results: 39
2018-04-10T07:51:28.8791160Z Publishing Attachments: 3
2018-04-10T07:51:29.8023722Z Failed tests: 2; Total tests: 39;
2018-04-10T07:51:29.9086633Z **************** Rerunning failed tests for Test run 450 *********************
2018-04-10T07:51:29.9086887Z Max attempts: 3; Current attempt: 1; Failed test cases threshold: 30; Failed test cases max limit: 0
2018-04-10T07:51:29.9087136Z [command]C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe #C:\Users\VssAdministrator\AppData\Local\Temp\tmp3668.tmp
2018-04-10T07:51:30.0872809Z Microsoft (R) Test Execution Command Line Tool Version 15.6.0
2018-04-10T07:51:30.0874243Z Copyright (c) Microsoft Corporation. All rights reserved.
2018-04-10T07:51:30.0907958Z vstest.console.exe /TestCaseFilter:"FullyQualifiedName=V6TestAutomation.TestTableExplorer.Delete Record|FullyQualifiedName=V6TestAutomation.TestTableExplorer.Create Record"
2018-04-10T07:51:30.0908308Z "D:\a\r1\a\Test Automation\bin\V6TestAutomation.dll"
2018-04-10T07:51:30.0908475Z /logger:"trx"
2018-04-10T07:51:30.0908664Z /TestAdapterPath:"D:\a\r1\a\Test Automation\packages"
2018-04-10T07:51:30.3707778Z Starting test execution, please wait...
2018-04-10T07:51:30.6698475Z SpecFlow+Runner execution started
2018-04-10T07:51:30.7564008Z SpecRun: running tests in D:\a\r1\a\Test Automation\bin\V6TestAutomation.dll
2018-04-10T07:51:30.7564629Z Profile: Results
2018-04-10T07:51:30.8100191Z Discovering target: Default
2018-04-10T07:51:30.8100808Z Discovering tests from assembly: D:\a\r1\a\Test Automation\bin\V6TestAutomation.dll
2018-04-10T07:51:33.2194874Z Result: tests executed with warnings
2018-04-10T07:51:33.2195303Z Total: 0
2018-04-10T07:51:33.2198974Z Succeeded: 0
2018-04-10T07:51:33.2204195Z Ignored: 0
2018-04-10T07:51:33.2204453Z Pending: 0
2018-04-10T07:51:33.2204660Z Skipped: 0
2018-04-10T07:51:33.2204862Z Failed: 0
2018-04-10T07:51:33.2205031Z Execution Time: 00:00:00.1429995
2018-04-10T07:51:33.2205259Z Report file: file:///D:\a\r1\a\TestResults\V6TestAutomation_Results_2018-04-10T075130.html
2018-04-10T07:51:33.2241215Z Log file: file:///D:\a\r1\a\TestResults\V6TestAutomation_Results_2018-04-10T075130.log
2018-04-10T07:51:33.2264814Z SpecFlow+Runner execution finished
2018-04-10T07:51:33.3474231Z No test is available in D:\a\r1\a\Test Automation\bin\V6TestAutomation.dll. Make sure that test discoverer & executors are registered and platform & framework version settings are appropriate and try again.
2018-04-10T07:51:33.3550733Z Attachments:
2018-04-10T07:51:33.3551210Z C:\Users\VssAdministrator\AppData\Local\Temp\ktqh3alc.o31\V6TestAutomation_Results_2018-04-10T075130.log
2018-04-10T07:51:33.3551627Z C:\Users\VssAdministrator\AppData\Local\Temp\ktqh3alc.o31\V6TestAutomation_Results_2018-04-10T075130.html
2018-04-10T07:51:33.3737235Z **************** Completed test execution *********************
2018-04-10T07:51:33.3742156Z Test results files: D:\a\r1\a\TestResults\VssAdministrator_factoryvm-az261_2018-04-10_07_51_13.trx
2018-04-10T07:51:33.3778622Z Updating test results: 39
2018-04-10T07:51:33.3806561Z Publishing test results to test run '450'.
2018-04-10T07:51:33.5064845Z Test results remaining: 39. Test run id: 450.
2018-04-10T07:51:34.1698821Z Updated test results: 39
2018-04-10T07:51:34.1699499Z Publishing Attachments: 3
2018-04-10T07:51:34.5508376Z Failed tests: 2; Total tests: 39;
2018-04-10T07:51:34.6399978Z **************** Rerunning failed tests for Test run 450 *********************
2018-04-10T07:51:34.6400353Z Max attempts: 3; Current attempt: 2; Failed test cases threshold: 30; Failed test cases max limit: 0
2018-04-10T07:51:34.6400646Z [command]C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe #C:\Users\VssAdministrator\AppData\Local\Temp\tmp48E7.tmp
2018-04-10T07:51:34.8356823Z Microsoft (R) Test Execution Command Line Tool Version 15.6.0
2018-04-10T07:51:34.8357741Z Copyright (c) Microsoft Corporation. All rights reserved.
2018-04-10T07:51:34.8394018Z vstest.console.exe /TestCaseFilter:"FullyQualifiedName=V6TestAutomation.TestTableExplorer.Delete Record|FullyQualifiedName=V6TestAutomation.TestTableExplorer.Create Record"
2018-04-10T07:51:34.8394448Z "D:\a\r1\a\Test Automation\bin\V6TestAutomation.dll"
2018-04-10T07:51:34.8394775Z /logger:"trx"
2018-04-10T07:51:34.8395040Z /TestAdapterPath:"D:\a\r1\a\Test Automation\packages"
2018-04-10T07:51:35.1104820Z Starting test execution, please wait...
2018-04-10T07:51:35.3962945Z SpecFlow+Runner execution started
2018-04-10T07:51:35.4856434Z SpecRun: running tests in D:\a\r1\a\Test Automation\bin\V6TestAutomation.dll
2018-04-10T07:51:35.4857610Z Profile: Results
2018-04-10T07:51:35.5388466Z Discovering target: Default
2018-04-10T07:51:36.2348959Z Discovering tests from assembly: D:\a\r1\a\Test Automation\bin\V6TestAutomation.dll
2018-04-10T07:51:37.8740951Z Result: tests executed with warnings
2018-04-10T07:51:37.8741119Z Total: 0
2018-04-10T07:51:37.8741196Z Succeeded: 0
2018-04-10T07:51:37.8741271Z Ignored: 0
2018-04-10T07:51:37.8741367Z Pending: 0
2018-04-10T07:51:37.8741441Z Skipped: 0
2018-04-10T07:51:37.8741515Z Failed: 0
2018-04-10T07:51:37.8741594Z Execution Time: 00:00:00.1390451
2018-04-10T07:51:37.8741720Z Report file: file:///D:\a\r1\a\TestResults\V6TestAutomation_Results_2018-04-10T075135.html
2018-04-10T07:51:37.8795841Z Log file: file:///D:\a\r1\a\TestResults\V6TestAutomation_Results_2018-04-10T075135.log
2018-04-10T07:51:37.8799980Z SpecFlow+Runner execution finished
2018-04-10T07:51:37.9989204Z No test is available in D:\a\r1\a\Test Automation\bin\V6TestAutomation.dll. Make sure that test discoverer & executors are registered and platform & framework version settings are appropriate and try again.
2018-04-10T07:51:38.0066895Z Attachments:
2018-04-10T07:51:38.0070117Z C:\Users\VssAdministrator\AppData\Local\Temp\qj2sdzi0.2zo\V6TestAutomation_Results_2018-04-10T075135.log
2018-04-10T07:51:38.0070466Z C:\Users\VssAdministrator\AppData\Local\Temp\qj2sdzi0.2zo\V6TestAutomation_Results_2018-04-10T075135.html
2018-04-10T07:51:38.0255222Z **************** Completed test execution *********************
2018-04-10T07:51:38.0260460Z Test results files: D:\a\r1\a\TestResults\VssAdministrator_factoryvm-az261_2018-04-10_07_51_13.trx
2018-04-10T07:51:38.0286385Z Updating test results: 39
2018-04-10T07:51:38.0286821Z Publishing test results to test run '450'.
2018-04-10T07:51:38.1088816Z Test results remaining: 39. Test run id: 450.
2018-04-10T07:51:38.8928593Z Updated test results: 39
2018-04-10T07:51:38.8929427Z Publishing Attachments: 3
2018-04-10T07:51:39.3643307Z Failed tests: 2; Total tests: 39;
2018-04-10T07:51:39.4770115Z **************** Rerunning failed tests for Test run 450 *********************
2018-04-10T07:51:39.4770400Z Max attempts: 3; Current attempt: 3; Failed test cases threshold: 30; Failed test cases max limit: 0
2018-04-10T07:51:39.4771471Z [command]C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe #C:\Users\VssAdministrator\AppData\Local\Temp\tmp5BC4.tmp
2018-04-10T07:51:39.6540115Z Microsoft (R) Test Execution Command Line Tool Version 15.6.0
2018-04-10T07:51:39.6540767Z Copyright (c) Microsoft Corporation. All rights reserved.
2018-04-10T07:51:39.6575246Z vstest.console.exe /TestCaseFilter:"FullyQualifiedName=V6TestAutomation.TestTableExplorer.Delete Record|FullyQualifiedName=V6TestAutomation.TestTableExplorer.Create Record"
2018-04-10T07:51:39.6575652Z "D:\a\r1\a\Test Automation\bin\V6TestAutomation.dll"
2018-04-10T07:51:39.6576107Z /logger:"trx"
2018-04-10T07:51:39.6576343Z /TestAdapterPath:"D:\a\r1\a\Test Automation\packages"
2018-04-10T07:51:39.9186431Z Starting test execution, please wait...
2018-04-10T07:51:40.2173519Z SpecFlow+Runner execution started
2018-04-10T07:51:40.3177982Z SpecRun: running tests in D:\a\r1\a\Test Automation\bin\V6TestAutomation.dll
2018-04-10T07:51:40.3178533Z Profile: Results
2018-04-10T07:51:40.3718045Z Discovering target: Default
2018-04-10T07:51:40.3728894Z Discovering tests from assembly: D:\a\r1\a\Test Automation\bin\V6TestAutomation.dll
2018-04-10T07:51:42.7354487Z Result: tests executed with warnings
2018-04-10T07:51:42.7358260Z Total: 0
2018-04-10T07:51:42.7361861Z Succeeded: 0
2018-04-10T07:51:42.7366617Z Ignored: 0
2018-04-10T07:51:42.7366911Z Pending: 0
2018-04-10T07:51:42.7367075Z Skipped: 0
2018-04-10T07:51:42.7367232Z Failed: 0
2018-04-10T07:51:42.7367423Z Execution Time: 00:00:00.1520062
2018-04-10T07:51:42.7367608Z Report file: file:///D:\a\r1\a\TestResults\V6TestAutomation_Results_2018-04-10T075140.html
2018-04-10T07:51:42.7400258Z Log file: file:///D:\a\r1\a\TestResults\V6TestAutomation_Results_2018-04-10T075140.log
2018-04-10T07:51:42.7400615Z SpecFlow+Runner execution finished
2018-04-10T07:51:42.8538664Z No test is available in D:\a\r1\a\Test Automation\bin\V6TestAutomation.dll. Make sure that test discoverer & executors are registered and platform & framework version settings are appropriate and try again.
2018-04-10T07:51:42.8612084Z Attachments:
2018-04-10T07:51:42.8612798Z C:\Users\VssAdministrator\AppData\Local\Temp\yetfa5qk.yec\V6TestAutomation_Results_2018-04-10T075140.log
2018-04-10T07:51:42.8613054Z C:\Users\VssAdministrator\AppData\Local\Temp\yetfa5qk.yec\V6TestAutomation_Results_2018-04-10T075140.html
2018-04-10T07:51:42.8800667Z **************** Completed test execution *********************
2018-04-10T07:51:42.8806717Z Test results files: D:\a\r1\a\TestResults\VssAdministrator_factoryvm-az261_2018-04-10_07_51_13.trx
2018-04-10T07:51:42.8852645Z Updating test results: 39
2018-04-10T07:51:42.8852918Z Publishing test results to test run '450'.
2018-04-10T07:51:42.9670889Z Test results remaining: 39. Test run id: 450.
2018-04-10T07:51:44.0187591Z Updated test results: 39
2018-04-10T07:51:44.0187889Z Publishing Attachments: 3
2018-04-10T07:51:44.2739520Z ##[warning]Maximum number of attempts running the failed tests reached: 3
2018-04-10T07:51:44.3511297Z Completed TestExecution Model...
2018-04-10T07:51:44.4323867Z ##[section]Finishing: Execute Automated Tests

TFS 2015 Build - Run functional tests - Failed to obtain durationInMs field

The step "Run functional tests" in a build lauched with TFS 2015 ends with this error message :
DistributedTests: Test run is aborted. Logging details of the run logs.
DistributedTests: Une nouvelle série de tests a été créée.
Série de tests mise en file d\'attente pour Project Collection Build Service (TEAM FOUNDATION).
DistributedTests: Test discovery started.
DistributedTests: Test Run Discovery Completed . Test run id : 14886
DistributedTests: 2 test cases discovered.
DistributedTests: Test execution started. Test run id : 14886
DistributedTests: UnExpected error occured during test execution. Try again.
DistributedTests: Error : Une ou plusieurs erreurs se sont produites.--->Failed to obtain durationInMs field.
DistributedTests: Test run aborted. Test run id: 14886
Any ideas to fix it?
There is a known issue on vsts-tasks github, check you are not having the following:
System is expected to throw “Failed to obtain durationInMs” error if TFS/Build Agent is Update 1, but Test Agent is higher than Update 1 viz Update 2. The reason is that we have done changes around durationInMs in Test Agent 2015 Update 2 and also in TFS 2015 Update 2, hence Test Agent 2015 Update 2 and higher versions are not backward compatible with lower versions of TFS.
Also both from the linked issue and from here it seems that the reason can be that the system is in French.

VSTS Build fails running NUnit tests

When building a visual studio solution using visual studio team services it runs the unit tests, written in nunit 3 using the nunit 3 NUnit3TestAdapter it starts running the tests.
The error it gives is: Error: Illegal characters in path.
The complete output as follows
2016-02-11T17:02:40.8514411Z Executing the powershell script: C:\BuildAgent\tasks\VSTest\1.0.29\VSTest.ps1
2016-02-11T17:02:41.1483135Z ##[debug]Calling Invoke-VSTest for all test assemblies
2016-02-11T17:02:41.2108131Z Working folder: C:\BuildAgent\_work\5
2016-02-11T17:02:41.2108131Z Executing C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe "C:\BuildAgent\_work\5\s\xxxxxxxxxxTests\bin\Release\xxxxxxxxxxTests.dll" /logger:trx /TestAdapterPath:"C:\BuildAgent\_work\5\s"
2016-02-11T17:02:41.5240692Z Microsoft (R) Test Execution Command Line Tool Version 14.0.24720.0
2016-02-11T17:02:41.5240692Z Copyright (c) Microsoft Corporation. All rights reserved.
2016-02-11T17:02:42.1326930Z Starting test execution, please wait...
2016-02-11T17:02:46.4921857Z Information: NUnit Adapter 3.0.8.0 executing tests is started
2016-02-11T17:02:46.5077303Z Information: Running all tests in C:\BuildAgent\_work\5\s\xxxxxxxxxxTests\bin\Release\xxxxxxxxxxTests.dll
2016-02-11T17:02:46.6327336Z Information: NUnit Adapter 3.0.8.0 executing tests is finished
2016-02-11T17:02:46.6327336Z ##[error]Error: Exception System.ArgumentException, Exception thrown executing tests
2016-02-11T17:02:46.6327336Z ##[error]
2016-02-11T17:02:46.6327336Z ##[error]Error: Illegal characters in path.
2016-02-11T17:02:46.6327336Z ##[error]
2016-02-11T17:02:46.7108474Z Information: Additionally, you can try specifying '/UseVsixExtensions' command if the test discoverer & executor is installed on the machine as vsix extensions and your installation supports vsix extensions. Example: vstest.console.exe myTests.dll /UseVsixExtensions:true
2016-02-11T17:02:46.8358887Z ##[error]VSTest Test Run failed with exit code: 1
2016-02-11T17:02:46.8514965Z ##[warning]No results found to publish.
We have an on premise build agent but I don't think this should make an difference.
Any advice you can give it appreciated.
FWIW, I switched on verbose logging by following the Tips and Tricks and got this:
2016-02-23T14:45:49.5620657Z Information: Running all tests in C:\TFS2015\_work\3\s\BlaBlaTests\bin\Debug\BlaBlaTests.dll
2016-02-23T14:45:49.6088663Z ##[error]Error: Exception thrown executing tests
2016-02-23T14:45:49.6088663Z ##[error]
2016-02-23T14:45:49.6088663Z ##[error]Error: System.ArgumentException: Illegal characters in path.
2016-02-23T14:45:49.6088663Z ##[error] at System.IO.Path.CheckInvalidPathChars(String path)
2016-02-23T14:45:49.6088663Z ##[error] at System.IO.Path.Combine(String path1, String path2)
2016-02-23T14:45:49.6088663Z ##[error] at NUnit.Engine.Services.ExtensionService.ProcessAddinsFile(DirectoryInfo baseDir, String fileName)
2016-02-23T14:45:49.6088663Z ##[error] at NUnit.Engine.Services.ExtensionService.FindExtensionsInDirectory(DirectoryInfo startDir)
2016-02-23T14:45:49.6088663Z ##[error] at NUnit.Engine.Services.ExtensionService.StartService()
2016-02-23T14:45:49.6088663Z ##[error] at NUnit.Engine.Services.ServiceManager.StartServices()
2016-02-23T14:45:49.6088663Z ##[error] at NUnit.Engine.TestEngine.Initialize()
2016-02-23T14:45:49.6088663Z ##[error] at NUnit.Engine.TestEngine.GetRunner(TestPackage package)
2016-02-23T14:45:49.6088663Z ##[error] at NUnit.VisualStudio.TestAdapter.NUnitTestAdapter.GetRunnerFor(String assemblyName)
2016-02-23T14:45:49.6088663Z ##[error] at NUnit.VisualStudio.TestAdapter.NUnit3TestExecutor.RunAssembly(String assemblyName, IFrameworkHandle frameworkHandle)
2016-02-23T14:45:49.6088663Z ##[error] at NUnit.VisualStudio.TestAdapter.NUnit3TestExecutor.RunTests(IEnumerable`1 sources, IRunContext runContext, IFrameworkHandle frameworkHandle)
2016-02-23T14:45:49.6088663Z ##[error]
2016-02-23T14:45:49.6088663Z Information: NUnit Adapter 3.0.8.0 executing tests is finished
which correlates with %LOCALAPPDATA%\NUnit\Nunit30Settings.xml being accessed but might not be related. ExtensionService is here.
Issues #117 and #118 are related to this with a fix as provided by RobertK66:
If you install the Version 3.0.8.0 as a Nuget package then there is a
corrupted (not empty!) “ignore.addins” file installed in the
packages\NUnit3TestAdapter.3.0.8-ctp-8\lib folder. Earlier Versions
did install a 0byte empty file!
After removing the content of this file in the
/packages/NUnit3TestAdapter.3.0.8-ctp-8\lib folder and
deleting the cached version of the adapter under
\AppData\Local\Temp\VisualStudioTestExplorerExtensions...
everything works as expected!
I met this issue when I use NUnit3 Test Adapter Nuget Package during the build. And I resolved it by installing NUnit3 Test Adapter and upload all the installed files to Version Control and use it as the Test Adapter.
Since you are using on premise build agent. You can easily install the NUnit3 Test Adapter on the build agent and use "/UseVsixExtensions:true" argument as the error message indicates.

What might be the reason of the 53 exception during 'Visual Studio Test Agent Deployment' step

Currently I'm trying to use tfs 2015 and vNext build system. There is this exception during 'Visual Studio Test Agent Deployment' step, and I'm not really sure what to do.
What might cause this exception:
Executing the powershell script: ...\DeployTestAgent.ps1
DistributedTests: Starting to deploy and configure test agent on test machines.
DistributedTests: Inputs provided are:
DistributedTests: Machines:
DistributedTests: Username: ...\...
DistributedTests: Machine Group name: Tracker Test Machines
DistributedTests: Run as process: False
DistributedTests: Login Automatically: False
DistributedTests: Disable Screen saver: False
DistributedTests: Agent location: C:\Distr\vstf_testagent.exe
DistributedTests: Update test agent: True
DistributedTests: Run test agent as DataCollection only : False
DistributedTests: Path to script that installs test agent on remote machine: ...\TestAgentInstall.ps1
DistributedTests: Path to script that configures test agent on remote machine: ...\TestAgentConfiguration.ps1
DistributedTests: Path to script that downloads test agent on azure remote machines : ...\DownloadTestAgent.ps1
DistributedTests: Path to script that checks if test agent is installed on remote machine: ...\CheckTestAgentInstallation.ps1
DistributedTests: Test Agent is being copied to: ...\Temp\3bc272a1-3cc0-479e-aff8-84483e1f6ad8\vstf_testagent.exe
DistributedTests: Task 'CopyFilesToTestAgent' on machine '...:5985' is being run
DistributedTests: Task 'CopyFilesToTestAgent' on machine '...:5985' completed.
DistributedTests: Task 'CopyFilesToTestAgent' for machine ...:5985's Error : System.AggregateException: Failed to execute the powershell script. Consult the logs below for details of the error.
Failed to connect to the path \\... with the user .\... for copying.System error 53 has occurred.
The network path was not found.
---> System.Management.Automation.RuntimeException: Failed to connect to the path \\... with the user .\... for copying.System error 53 has occurred.
The network path was not found.
---> System.Management.Automation.RuntimeException: Failed to connect to the path \\... with the user .\... for copying.System error 53 has occurred.
The network path was not found.
--- End of inner exception stack trace ---
at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input)
at System.Management.Automation.PowerShell.Worker.ConstructPipelineAndDoWork(Runspace rs, Boolean performSyncInvoke)
at System.Management.Automation.PowerShell.Worker.CreateRunspaceIfNeededAndDoWork(Runspace rsToUse, Boolean isSync)
at System.Management.Automation.PowerShell.CoreInvokeHelper[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
at System.Management.Automation.PowerShell.CoreInvoke[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
at System.Management.Automation.PowerShell.Invoke(IEnumerable input, PSInvocationSettings settings)
at Microsoft.VisualStudio.Services.DevTestLabs.Deployment.Deployment.PowershellExecutor.<>c__DisplayClass26_0.<Invoke>b__0()
at Microsoft.VisualStudio.Services.DevTestLabs.Deployment.RetryExecutor.<>c__DisplayClass19_0`1.<Execute>b__0()
at Microsoft.VisualStudio.Services.DevTestLabs.Deployment.RetryExecutor.Execute(Action action)
at Microsoft.VisualStudio.Services.DevTestLabs.Deployment.RetryExecutor.Execute[T](Func`1 action)
at Microsoft.VisualStudio.Services.DevTestLabs.Deployment.Deployment.PowershellExecutor.Invoke(String errorContextMessage, Boolean writeResultToLog, Boolean isCancellable)
--- End of inner exception stack trace ---
...
Other remote powershell scripts seem to run without troubles. Not sure what it might be.
As usual, don't hesitate to ask for additional information.
Looks like you need to enable file sharing:
In this specific situation the RoboCopy tool is complaining that the
network path was not found, because I forgot to enable file sharing on
the target machine. Once I enabled file sharing an running again the
build everything was green, and I can verify that all files were
correctly copied on target machines.
http://www.codewrecks.com/blog/index.php/2015/06/20/build-vnext-support-for-deploying-bits-to-windows-machines/
I just had a similar issue and the problem was that I had to enable certain rules in the Windows Firewall that the Filesharing works.
I tested it by disabling the firewall completly and then just try to connect through the Windows Explorer to this FileShare via "\MachineName"
As soon as this worked, this error was gone as well.
After this I reenabled the Firewall again and tried to figure out the rules that have to be added.
In the Advanced Firewall settings are some rules regarding File and Printer Sharing that are disabled, I enabled those and that made it work.
Hope this helps