0
votes

Log from latest run; Trimmed down to keep it concise

2019-07-18T18:27:42.9323100Z ##[section]Starting: VsTest - testAssemblies
2019-07-18T18:27:42.9323100Z Task         : Visual Studio Test
2019-07-18T18:27:42.9323100Z Description  : Run tests with Visual Studio test runner
2019-07-18T18:27:43.2448193Z ##[debug]agent.workFolder=D:\TFSVSOWork
2019-07-18T18:27:43.5104476Z ##[debug]System.DefaultWorkingDirectory=D:\TFSVSOWork\r45\a
2019-07-18T18:27:43.6979545Z ##[debug]check path : D:\TFSVSOWork\_tasks\VSTest_ef087383-ee5e-42c7-9a53-ab56c98420f9\2.0.55\task.json
2019-07-18T18:27:43.6979545Z ##[debug]set resource file to: D:\TFSVSOWork\_tasks\VSTest_ef087383-ee5e-42c7-9a53-ab56c98420f9\2.0.55\task.json
2019-07-18T18:27:43.6979545Z ##[debug]system.culture=en-US
2019-07-18T18:27:43.6979545Z ##[debug]System.ParallelExecutionType=None
2019-07-18T18:27:43.6979545Z ##[debug]Value of ParallelExecutionType :None
2019-07-18T18:27:43.6979545Z ##[debug]testSelector=testAssemblies
2019-07-18T18:27:43.6979545Z ##[debug]Value of Test Selector :testAssemblies
2019-07-18T18:27:43.6979545Z ##[debug]testAssemblyVer2=XYZAppName.Nunit.UITests.dll
2019-07-18T18:27:43.6979545Z Test assemblies : XYZAppName.Nunit.UITests.dll
2019-07-18T18:27:43.6979545Z ##[debug]testFiltercriteria=null
2019-07-18T18:27:43.6979545Z Test filter criteria : null
2019-07-18T18:27:43.6979545Z ##[debug]searchFolder=\\Servername\D$\FAF_Applications\Http\XYZAppName\test
2019-07-18T18:27:43.6979545Z Search folder : \\Servername\D$\FAF_Applications\Http\XYZAppName\test
2019-07-18T18:27:43.6979545Z ##[debug]runSettingsFile=D:\TFSVSOWork\r45\a
2019-07-18T18:27:43.6979545Z Run settings file : D:\TFSVSOWork\r45\a
2019-07-18T18:27:43.6979545Z ##[debug]overrideTestrunParameters=null
2019-07-18T18:27:43.7135813Z ##[debug]runInParallel=false
2019-07-18T18:27:43.7135813Z Run in parallel : false
2019-07-18T18:27:43.7135813Z ##[debug]runTestsInIsolation=false
2019-07-18T18:27:43.7135813Z Run in isolation : false
2019-07-18T18:27:43.7135813Z ##[debug]runOnlyImpactedTests=false
2019-07-18T18:27:43.7135813Z ##[debug]wmic arg: ["datafile","where","name='C:\\\\Program Files (x86)\\\\Microsoft Visual Studio\\\\2017\\\\TestAgent\\\\Common7\\\\IDE\\\\Extensions\\\\TestPlatform\\\\vstest.console.exe'","get","Version","/Value"]
2019-07-18T18:27:43.7135813Z ##[debug]exec tool: wmic
2019-07-18T18:27:43.7135813Z ##[debug]Arguments:
2019-07-18T18:27:43.7135813Z ##[debug]   datafile
2019-07-18T18:27:43.7135813Z ##[debug]   where
2019-07-18T18:27:43.7135813Z ##[debug]   name='C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\TestAgent\\Common7\\IDE\\Extensions\\TestPlatform\\vstest.console.exe'
2019-07-18T18:27:43.7135813Z ##[debug]   get
2019-07-18T18:27:43.7135813Z ##[debug]   Version
2019-07-18T18:27:43.7135813Z ##[debug]   /Value
2019-07-18T18:27:43.7135813Z [command]wmic datafile where "name='C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\TestAgent\\Common7\\IDE\\Extensions\\TestPlatform\\vstest.console.exe'" get Version /Value
2019-07-18T18:27:43.8073338Z Version=15.0.0.0
2019-07-18T18:27:43.8073338Z ##[debug]VSTest Version information: 
2019-07-18T18:27:43.8073338Z Version=15.0.0.0
2019-07-18T18:27:43.8073338Z ##[debug]publishRunAttachments=true
2019-07-18T18:27:43.8073338Z ##[debug]vstest.ignoretestfailures=undefined
2019-07-18T18:27:43.8073338Z ========================================================
2019-07-18T18:27:43.8073338Z ##[debug]TestRunResults Directory : D:\TFSVSOWork\r45\a\TestResults
2019-07-18T18:27:43.8073338Z ##[debug]rm -rf D:\TFSVSOWork\r45\a\TestResults
2019-07-18T18:27:43.8073338Z ##[debug]testing directory 'D:\TFSVSOWork\r45\a\TestResults'
2019-07-18T18:27:43.8073338Z ##[debug]testing directory 'D:\TFSVSOWork\r45\a'
2019-07-18T18:27:43.8073338Z ##[debug]mkdir 'D:\TFSVSOWork\r45\a\TestResults'
2019-07-18T18:27:43.8073338Z ##[debug]Searching for test assemblies in: \\Servername\D$\FAF_Applications\Http\XYZAppName\test
2019-07-18T18:27:43.8073338Z ##[debug]defaultRoot: '\\Servername\D$\FAF_Applications\Http\XYZAppName\test'
2019-07-18T18:27:43.8073338Z ##[debug]findOptions.followSpecifiedSymbolicLink: 'true'
2019-07-18T18:27:43.8073338Z ##[debug]findOptions.followSymbolicLinks: 'true'
2019-07-18T18:27:43.8073338Z ##[debug]matchOptions.debug: 'false'
2019-07-18T18:27:43.8073338Z ##[debug]matchOptions.nobrace: 'true'
2019-07-18T18:27:43.8073338Z ##[debug]matchOptions.noglobstar: 'false'
2019-07-18T18:27:43.8073338Z ##[debug]matchOptions.dot: 'true'
2019-07-18T18:27:43.8073338Z ##[debug]matchOptions.noext: 'false'
2019-07-18T18:27:43.8073338Z ##[debug]matchOptions.nocase: 'true'
2019-07-18T18:27:43.8073338Z ##[debug]matchOptions.nonull: 'false'
2019-07-18T18:27:43.8073338Z ##[debug]matchOptions.matchBase: 'false'
2019-07-18T18:27:43.8073338Z ##[debug]matchOptions.nocomment: 'false'
2019-07-18T18:27:43.8073338Z ##[debug]matchOptions.nonegate: 'false'
2019-07-18T18:27:43.8073338Z ##[debug]matchOptions.flipNegate: 'false'
2019-07-18T18:27:43.8073338Z ##[debug]pattern: 'XYZAppName.Nunit.UITests.dll'
2019-07-18T18:27:43.8073338Z ##[debug]findPath: '\\Servername\D$\FAF_Applications\Http\XYZAppName\test\XYZAppName.Nunit.UITests.dll'
2019-07-18T18:27:43.8073338Z ##[debug]statOnly: 'true'
2019-07-18T18:27:43.8229587Z ##[debug]found 1 paths
2019-07-18T18:27:43.8229587Z ##[debug]applying include pattern
2019-07-18T18:27:43.8229587Z ##[debug]adjustedPattern: '\\Servername\D$\FAF_Applications\Http\XYZAppName\test\XYZAppName.Nunit.UITests.dll'
2019-07-18T18:27:43.8229587Z ##[debug]1 matches
2019-07-18T18:27:43.8229587Z ##[debug]1 final results
2019-07-18T18:27:43.8229587Z ##[debug]DisableTestImpactAnalysis=undefined
2019-07-18T18:27:43.8229587Z ##[debug]Non TIA mode of test execution
2019-07-18T18:27:43.8229587Z ##[debug]defaultRoot: '\\Servername\D$\FAF_Applications\Http\XYZAppName\test'
2019-07-18T18:27:43.8229587Z ##[debug]findOptions.followSpecifiedSymbolicLink: 'true'
2019-07-18T18:27:43.8229587Z ##[debug]findOptions.followSymbolicLinks: 'true'
2019-07-18T18:27:43.8229587Z ##[debug]matchOptions.debug: 'false'
2019-07-18T18:27:43.8229587Z ##[debug]matchOptions.nobrace: 'true'
2019-07-18T18:27:43.8229587Z ##[debug]matchOptions.noglobstar: 'false'
2019-07-18T18:27:43.8229587Z ##[debug]matchOptions.dot: 'true'
2019-07-18T18:27:43.8229587Z ##[debug]matchOptions.noext: 'false'
2019-07-18T18:27:43.8229587Z ##[debug]matchOptions.nocase: 'true'
2019-07-18T18:27:43.8229587Z ##[debug]matchOptions.nonull: 'false'
2019-07-18T18:27:43.8229587Z ##[debug]matchOptions.matchBase: 'false'
2019-07-18T18:27:43.8229587Z ##[debug]matchOptions.nocomment: 'false'
2019-07-18T18:27:43.8229587Z ##[debug]matchOptions.nonegate: 'false'
2019-07-18T18:27:43.8229587Z ##[debug]matchOptions.flipNegate: 'false'
2019-07-18T18:27:43.8229587Z ##[debug]pattern: '**\*TestAdapter.dll'
2019-07-18T18:27:43.8229587Z ##[debug]findPath: '\\Servername\D$\FAF_Applications\Http\XYZAppName\test'
2019-07-18T18:27:43.8229587Z ##[debug]statOnly: 'false'
2019-07-18T18:27:43.8229587Z ##[debug]findPath: '\\Servername\D$\FAF_Applications\Http\XYZAppName\test'
2019-07-18T18:27:43.8229587Z ##[debug]findOptions.followSpecifiedSymbolicLink: 'true'
2019-07-18T18:27:43.8229587Z ##[debug]findOptions.followSymbolicLinks: 'true'
2019-07-18T18:27:43.9167061Z ##[debug]306 results
2019-07-18T18:27:43.9167061Z ##[debug]found 306 paths
2019-07-18T18:27:43.9167061Z ##[debug]applying include pattern
2019-07-18T18:27:43.9167061Z ##[debug]adjustedPattern: '\\Servername\D$\FAF_Applications\Http\XYZAppName\test\**\*TestAdapter.dll'
2019-07-18T18:27:43.9167061Z ##[debug]1 matches
2019-07-18T18:27:43.9167061Z ##[debug]1 final results
2019-07-18T18:27:43.9167061Z ##[debug]System.Debug=true
2019-07-18T18:27:43.9167061Z ##[warning]vstest.console.exe version does not support the /diag flag. Enable diagnositics via the exe.config files
2019-07-18T18:27:43.9167061Z ##[debug]Processed: ##vso[task.issue type=warning;]vstest.console.exe version does not support the /diag flag. Enable diagnositics via the exe.config files
2019-07-18T18:27:43.9167061Z ##[debug]C:\Program Files (x86)\Microsoft Visual Studio\2017\TestAgent\Common7\IDE\Extensions\TestPlatform\vstest.console.exe arg: \\Servername\D$\FAF_Applications\Http\XYZAppName\test\XYZAppName.Nunit.UITests.dll
2019-07-18T18:27:43.9323329Z ##[debug]C:\Program Files (x86)\Microsoft Visual Studio\2017\TestAgent\Common7\IDE\Extensions\TestPlatform\vstest.console.exe arg: /logger:trx
2019-07-18T18:27:43.9323329Z ##[debug]C:\Program Files (x86)\Microsoft Visual Studio\2017\TestAgent\Common7\IDE\Extensions\TestPlatform\vstest.console.exe arg: /TestAdapterPath:"D:\TFSVSOWork\r45\a"
2019-07-18T18:27:43.9323329Z ##[debug]C:\Program Files (x86)\Microsoft Visual Studio\2017\TestAgent\Common7\IDE\Extensions\TestPlatform\vstest.console.exe arg: /framework: ".NetFramework,version=V4.7.2"
2019-07-18T18:27:43.9323329Z ##[debug]testing directory 'D:\TFSVSOWork\r45\a\TestResults'
2019-07-18T18:27:43.9323329Z ##[debug]testing directory 'D:\TFSVSOWork\r45\a'
2019-07-18T18:27:43.9323329Z ##[debug]mkdir 'D:\TFSVSOWork\r45\a\TestResults'
2019-07-18T18:27:43.9323329Z ##[debug]exec tool: C:\Program Files (x86)\Microsoft Visual Studio\2017\TestAgent\Common7\IDE\Extensions\TestPlatform\vstest.console.exe
2019-07-18T18:27:43.9323329Z ##[debug]Arguments:
2019-07-18T18:27:43.9323329Z ##[debug]   \\Servername\D$\FAF_Applications\Http\XYZAppName\test\XYZAppName.Nunit.UITests.dll
2019-07-18T18:27:43.9323329Z ##[debug]   /logger:trx
2019-07-18T18:27:43.9323329Z ##[debug]   /TestAdapterPath:"D:\TFSVSOWork\r45\a"
2019-07-18T18:27:43.9323329Z ##[debug]   /framework:
2019-07-18T18:27:43.9323329Z ##[debug]   .NetFramework,version=V4.7.2
2019-07-18T18:27:43.9323329Z [command]"C:\Program Files (x86)\Microsoft Visual Studio\2017\TestAgent\Common7\IDE\Extensions\TestPlatform\vstest.console.exe" \\Servername\D$\FAF_Applications\Http\XYZAppName\test\XYZAppName.Nunit.UITests.dll /logger:trx "/TestAdapterPath:\"D:\TFSVSOWork\r45\a\"" /framework: .NetFramework,version=V4.7.2
2019-07-18T18:27:44.0417108Z Microsoft (R) Test Execution Command Line Tool Version 15.9.0
2019-07-18T18:27:44.1198351Z The /Framework argument requires the target .Net Framework version for the test run.   Example:  /Framework:".NETFramework,Version=v4.5.1"
2019-07-18T18:27:44.1198351Z The test source file "D:\TFSVSOWork\r45\a\.NetFramework,version=V4.7.2" provided was not found.
2019-07-18T18:27:44.1198351Z The test source file "D:\TFSVSOWork\r45\a\.NetFramework,version=V4.7.2" provided was not found.
2019-07-18T18:27:44.3854671Z Description: Runs tests from the specified files.
2019-07-18T18:27:44.4323429Z ##[debug]rc:1
2019-07-18T18:27:44.4323429Z ##[debug]success:false
2019-07-18T18:27:44.4323429Z ##[warning]Vstest failed with error. Check logs for failures. There might be failed tests.
2019-07-18T18:27:44.4323429Z ##[debug]Processed: ##vso[task.issue type=warning;]Vstest failed with error. Check logs for failures. There might be failed tests.
2019-07-18T18:27:44.4323429Z ##[error]Error: C:\Program Files (x86)\Microsoft Visual Studio\2017\TestAgent\Common7\IDE\Extensions\TestPlatform\vstest.console.exe failed with return code: 1
2019-07-18T18:27:44.4323429Z ##[debug]Processed: ##vso[task.issue type=error;]Error: C:\Program Files (x86)\Microsoft Visual Studio\2017\TestAgent\Common7\IDE\Extensions\TestPlatform\vstest.console.exe failed with return code: 1
2019-07-18T18:27:44.4323429Z ##[debug]defaultRoot: 'D:\TFSVSOWork\r45\a\TestResults'
2019-07-18T18:27:44.4323429Z ##[debug]findOptions.followSpecifiedSymbolicLink: 'true'
2019-07-18T18:27:44.4323429Z ##[debug]findOptions.followSymbolicLinks: 'true'
2019-07-18T18:27:44.4323429Z ##[debug]matchOptions.debug: 'false'
2019-07-18T18:27:44.4323429Z ##[debug]matchOptions.nobrace: 'true'
2019-07-18T18:27:44.4323429Z ##[debug]matchOptions.noglobstar: 'false'
2019-07-18T18:27:44.4323429Z ##[debug]matchOptions.dot: 'true'
2019-07-18T18:27:44.4323429Z ##[debug]matchOptions.noext: 'false'
2019-07-18T18:27:44.4323429Z ##[debug]matchOptions.nocase: 'true'
2019-07-18T18:27:44.4323429Z ##[debug]matchOptions.nonull: 'false'
2019-07-18T18:27:44.4323429Z ##[debug]matchOptions.matchBase: 'false'
2019-07-18T18:27:44.4323429Z ##[debug]matchOptions.nocomment: 'false'
2019-07-18T18:27:44.4323429Z ##[debug]matchOptions.nonegate: 'false'
2019-07-18T18:27:44.4323429Z ##[debug]matchOptions.flipNegate: 'false'
2019-07-18T18:27:44.4323429Z ##[debug]pattern: 'D:\TFSVSOWork\r45\a\TestResults\*.trx'
2019-07-18T18:27:44.4323429Z ##[debug]findPath: 'D:\TFSVSOWork\r45\a\TestResults'
2019-07-18T18:27:44.4323429Z ##[debug]statOnly: 'false'
2019-07-18T18:27:44.4323429Z ##[debug]findPath: 'D:\TFSVSOWork\r45\a\TestResults'
2019-07-18T18:27:44.4323429Z ##[debug]findOptions.followSpecifiedSymbolicLink: 'true'
2019-07-18T18:27:44.4323429Z ##[debug]findOptions.followSymbolicLinks: 'true'
2019-07-18T18:27:44.4323429Z ##[debug]  D:\TFSVSOWork\r45\a\TestResults (directory)
2019-07-18T18:27:44.4323429Z ##[debug]1 results
2019-07-18T18:27:44.4323429Z ##[debug]found 1 paths
2019-07-18T18:27:44.4323429Z ##[debug]applying include pattern
2019-07-18T18:27:44.4323429Z ##[debug]0 matches
2019-07-18T18:27:44.4323429Z ##[debug]0 final results
2019-07-18T18:27:44.4323429Z ##[debug]Processed: ##vso[task.logissue type=warning;code=002003;]
2019-07-18T18:27:44.4323429Z ##[warning]No results found to publish.
2019-07-18T18:27:44.4323429Z ##[debug]Processed: ##vso[task.issue type=warning;]No results found to publish.
2019-07-18T18:27:44.4323429Z ##[debug]task result: Failed
2019-07-18T18:27:44.4323429Z ##[error]Vstest exited with return code: 1.
2019-07-18T18:27:44.4323429Z ##[debug]Processed: ##vso[task.issue type=error;]Vstest exited with return code: 1.
2019-07-18T18:27:44.4323429Z ##[debug]Processed: ##vso[task.complete result=Failed;]Vstest exited with return code: 1.
2019-07-18T18:27:44.4479679Z ##[section]Finishing: VsTest - testAssemblies

TFS On premise "VS Test" task can't find test assemblies in the Release pipeline. Same tests execute fine in Build pipeline or when invoked locally within server from Command Prompt.

  1. Test assemblies are identified in the Build pipeline and are copied over to dev environment from build server
  2. Test dlls are found in dev server. Test ran successfully from Command Prompt and there are no issues
  3. Read/Write access has been granted to everyone
  4. Simple 'hello world' test, no need for any package or dependencies

Error:

2019-07-16T18:46:50.2821329Z ##[warning]No test assemblies found matching the pattern: \xyz.Nunit.UITests.dll,!\obj**

What am I missing in my configuration?Build Defenition

Update based on Suggestion 1. Added Publish task (Copy task was already there). [enter image description here][2]

  1. The error persists
1
Did you publish the assemblies from the build pipeline to the release pipeline?Peter
Running from a fileshare... I think you'll need to copy over the files to the local agent.jessehouwing

1 Answers

1
votes

According to your description, since build and remote server run test well, this seems related to your configuration of release pipeline.

You are lacking of artifacts, you need to add to Build Pipeline CopyFile task according to this

Source folder: $(system.defaultworkingdirectory)

Content : \bin\$(BuildConfiguration)** **\$(BuildConfiguration)*test*.dll !\obj**

Target Folder: $(build.artifactstagingdirectory)

enter image description here

Please take a look a look at this similar question here: Publishing test assemblies with artifacts in order to use them during functional tests on VSTS

Framework Argument I have added the framework argument in the definition too