microsoft / vso-agent

Visual Studio Team Services and TFS agent for Mac OSX and Linux
MIT License
131 stars 56 forks source link

Unable to publish test results #284

Closed aes-charts closed 8 years ago

aes-charts commented 8 years ago

Hi There,

We have created build step "Publish Test Results" with input parameter Junit test result file in xml format.

Here is the log out.

[Debug] 2016-04-17T07:12:57.924Z: testRunner: JUnit

[Debug] 2016-04-17T07:12:57.925Z: testResultsFiles: /_work/10/s/TEST-*.xml

[Debug] 2016-04-17T07:12:57.925Z: mergeTestResults: false

[Debug] 2016-04-17T07:12:57.925Z: testRunTitle: Unit Test

[Debug] 2016-04-17T07:12:57.925Z: platform:

[Debug] 2016-04-17T07:12:57.925Z: configuration:

[Debug] 2016-04-17T07:12:57.925Z: publishRunAttachments: true

[Debug] 2016-04-17T07:12:57.925Z:

[Debug] 2016-04-17T07:12:57.926Z: cwd: /home//_work/10/s

[Debug] 2016-04-17T07:12:58.239Z: loading inputs and endpoints

[Debug] 2016-04-17T07:12:58.247Z: loading INPUT_TESTRUNNER

[Debug] 2016-04-17T07:12:58.248Z: loading INPUT_TESTRESULTSFILES

[Debug] 2016-04-17T07:12:58.249Z: loading INPUT_MERGETESTRESULTS

[Debug] 2016-04-17T07:12:58.249Z: loading INPUT_TESTRUNTITLE

[Debug] 2016-04-17T07:12:58.249Z: loading INPUT_PUBLISHRUNATTACHMENTS

[Debug] 2016-04-17T07:12:58.249Z: loaded 5

[Debug] 2016-04-17T07:12:58.250Z: testRunner=JUnit

[Debug] 2016-04-17T07:12:58.250Z: testResultsFiles=/home/_work/10/s/TEST-*.xml

[Debug] 2016-04-17T07:12:58.251Z: mergeTestResults=false

[Debug] 2016-04-17T07:12:58.251Z: platform=null

[Debug] 2016-04-17T07:12:58.251Z: configuration=null

[Debug] 2016-04-17T07:12:58.252Z: testRunTitle=Unit Test

[Debug] 2016-04-17T07:12:58.252Z: publishRunAttachments=true

[Debug] 2016-04-17T07:12:58.252Z: testRunner: JUnit

[Debug] 2016-04-17T07:12:58.252Z: testResultsFiles: /home/_work/10/s/TEST-*.xml

[Debug] 2016-04-17T07:12:58.252Z: mergeResults: false

[Debug] 2016-04-17T07:12:58.252Z: platform: null

[Debug] 2016-04-17T07:12:58.252Z: config: null

[Debug] 2016-04-17T07:12:58.253Z: testRunTitle: Unit Test

[Debug] 2016-04-17T07:12:58.262Z: publishRunAttachments: true

[Debug] 2016-04-17T07:12:58.262Z: Pattern found in testResultsFiles parameter

[Debug] 2016-04-17T07:12:58.262Z: agent.buildDirectory=/home/_work/10

[Debug] 2016-04-17T07:13:01.122Z: find /home/_work/10

[Debug] 2016-04-17T07:13:01.122Z: 51986 matches.

2016-04-17T07:13:01.935Z:
2016-04-17T07:13:01.936Z: Start: Results.Publish async Command 2016-04-17T07:13:01.936Z: [warning]Failed to publish test results: Could not read file (): ENOENT: no such file or directory, open '' 2016-04-17T07:13:01.936Z: End: Results.Publish async Command 2016-04-17T07:13:01.936Z:

Regards,

Madhu

nigurr commented 8 years ago

Which version of Xplat agent are you using? Can you give Test Results Files = TEST*-.xml no need to append _work/s/ folder

aes-charts commented 8 years ago

Test results file is kept under _work/s/ folder. TEST-report1.zip I will let you know the version of xplat details.

nigurr commented 8 years ago

@aes-charts, by default this this path is prefixed. so you don't need to add this. The filter which I mentioned should do the job.

tarunaroraonline commented 8 years ago

@nigurr @aes-charts the agent version is 1.999.0

nigurr commented 8 years ago

That's not the one. Go to Build Agent folder and you will find packages.json file

"version": "0.5.9" //similar to this.

tarunaroraonline commented 8 years ago

@nigurr - Is this visible on the agent capabilities page at all or can you only see this in packages.json?

tarunaroraonline commented 8 years ago

@nigurr - changing the filter to Test Results Files = TEST*-.xml did not work. Still complaints the test results file not found. See the log below...

[Debug] 2016-04-18T08:31:10.129Z: scriptPath: /home/AspectAdmin/aspectagent01/_work/13/s/vsts-experiments/vsts-logparser-wrapper.sh

[Debug] 2016-04-18T08:31:10.131Z: args: tests_console_output.txt TEST-report.xml

[Debug] 2016-04-18T08:31:10.131Z: cwd: /home/AspectAdmin/aspectagent01/_work/13/s

[Debug] 2016-04-18T08:31:10.131Z: failOnStandardError: false

[Debug] 2016-04-18T08:31:10.131Z:

[Debug] 2016-04-18T08:31:10.132Z: cwd: /home/AspectAdmin/aspectagent01/_work/13/s

[Debug] 2016-04-18T08:31:10.449Z: loading inputs and endpoints

[Debug] 2016-04-18T08:31:10.457Z: loading INPUT_SCRIPTPATH

[Debug] 2016-04-18T08:31:10.459Z: loading INPUT_ARGS

[Debug] 2016-04-18T08:31:10.459Z: loading INPUT_CWD

[Debug] 2016-04-18T08:31:10.459Z: loading INPUT_FAILONSTANDARDERROR

[Debug] 2016-04-18T08:31:10.459Z: loaded 4

[Debug] 2016-04-18T08:31:10.459Z: check path : /home/AspectAdmin/aspectagent01/_work/tasks/ShellScript/1.0.19/task.json

[Debug] 2016-04-18T08:31:10.460Z: set resource file to: /home/AspectAdmin/aspectagent01/_work/tasks/ShellScript/1.0.19/task.json

[Debug] 2016-04-18T08:31:10.460Z: system.culture=en-US

[Debug] 2016-04-18T08:31:10.469Z: check path : /usr/bin/bash

[Debug] 2016-04-18T08:31:10.469Z: bash=/usr/bin/bash

[Debug] 2016-04-18T08:31:10.476Z: cwd=/home/AspectAdmin/aspectagent01/_work/13/s

[Debug] 2016-04-18T08:31:10.476Z: path exists: /home/AspectAdmin/aspectagent01/_work/13/s

[Debug] 2016-04-18T08:31:10.477Z: scriptPath=/home/AspectAdmin/aspectagent01/_work/13/s/vsts-experiments/vsts-logparser-wrapper.sh

[Debug] 2016-04-18T08:31:10.477Z: check path : /home/AspectAdmin/aspectagent01/_work/13/s/vsts-experiments/vsts-logparser-wrapper.sh

[Debug] 2016-04-18T08:31:10.477Z: /usr/bin/bash pathArg: /home/AspectAdmin/aspectagent01/_work/13/s/vsts-experiments/vsts-logparser-wrapper.sh

[Debug] 2016-04-18T08:31:10.478Z: /usr/bin/bash literal arg: /home/AspectAdmin/aspectagent01/_work/13/s/vsts-experiments/vsts-logparser-wrapper.sh

[Debug] 2016-04-18T08:31:10.478Z: args=tests_console_output.txt TEST-report.xml

[Debug] 2016-04-18T08:31:10.479Z: /usr/bin/bash arg: tests_console_output.txt TEST-report.xml

[Debug] 2016-04-18T08:31:10.479Z: failOnStandardError=false

[Debug] 2016-04-18T08:31:10.479Z: exec tool: /usr/bin/bash

[Debug] 2016-04-18T08:31:10.479Z: Arguments:

[Debug] 2016-04-18T08:31:10.479Z: /home/AspectAdmin/aspectagent01/_work/13/s/vsts-experiments/vsts-logparser-wrapper.sh

[Debug] 2016-04-18T08:31:10.480Z: tests_console_output.txt

[Debug] 2016-04-18T08:31:10.480Z: TEST-report.xml

2016-04-18T08:31:10.480Z: [command]/usr/bin/bash /home/AspectAdmin/aspectagent01/_work/13/s/vsts-experiments/vsts-logparser-wrapper.sh tests_console_output.txt TEST-report.xml

[Debug] 2016-04-18T08:31:10.542Z: rc:0

[Debug] 2016-04-18T08:31:10.543Z: success:true

[Debug] 2016-04-18T08:31:10.545Z: task result: Succeeded

[Debug] 2016-04-18T08:31:11.135Z: testRunner: JUnit

[Debug] 2016-04-18T08:31:11.135Z: testResultsFiles: /home/AspectAdmin/aspectagent01/work/13/s/TEST-.xml

[Debug] 2016-04-18T08:31:11.135Z: mergeTestResults: false

[Debug] 2016-04-18T08:31:11.135Z: testRunTitle: Unit Test

[Debug] 2016-04-18T08:31:11.135Z: platform:

[Debug] 2016-04-18T08:31:11.135Z: configuration:

[Debug] 2016-04-18T08:31:11.135Z: publishRunAttachments: true

[Debug] 2016-04-18T08:31:11.135Z:

[Debug] 2016-04-18T08:31:11.137Z: cwd: /home/AspectAdmin/aspectagent01/_work/13/s

[Debug] 2016-04-18T08:31:11.461Z: loading inputs and endpoints

[Debug] 2016-04-18T08:31:11.469Z: loading INPUT_TESTRUNNER

[Debug] 2016-04-18T08:31:11.470Z: loading INPUT_TESTRESULTSFILES

[Debug] 2016-04-18T08:31:11.470Z: loading INPUT_MERGETESTRESULTS

[Debug] 2016-04-18T08:31:11.470Z: loading INPUT_TESTRUNTITLE

[Debug] 2016-04-18T08:31:11.471Z: loading INPUT_PUBLISHRUNATTACHMENTS

[Debug] 2016-04-18T08:31:11.471Z: loaded 5

[Debug] 2016-04-18T08:31:11.477Z: testRunner=JUnit

[Debug] 2016-04-18T08:31:11.478Z: testResultsFiles=/home/AspectAdmin/aspectagent01/work/13/s/TEST-.xml

[Debug] 2016-04-18T08:31:11.478Z: mergeTestResults=false

[Debug] 2016-04-18T08:31:11.478Z: platform=null

[Debug] 2016-04-18T08:31:11.479Z: configuration=null

[Debug] 2016-04-18T08:31:11.479Z: testRunTitle=Unit Test

[Debug] 2016-04-18T08:31:11.479Z: publishRunAttachments=true

[Debug] 2016-04-18T08:31:11.479Z: testRunner: JUnit

[Debug] 2016-04-18T08:31:11.479Z: testResultsFiles: /home/AspectAdmin/aspectagent01/_work/13/s/TEST*-.xml

[Debug] 2016-04-18T08:31:11.480Z: mergeResults: false

[Debug] 2016-04-18T08:31:11.480Z: platform: null

[Debug] 2016-04-18T08:31:11.480Z: config: null

[Debug] 2016-04-18T08:31:11.480Z: testRunTitle: Unit Test

[Debug] 2016-04-18T08:31:11.480Z: publishRunAttachments: true

[Debug] 2016-04-18T08:31:11.481Z: Pattern found in testResultsFiles parameter

[Debug] 2016-04-18T08:31:11.481Z: agent.buildDirectory=/home/AspectAdmin/aspectagent01/_work/13

[Debug] 2016-04-18T08:31:14.289Z: find /home/AspectAdmin/aspectagent01/_work/13

[Debug] 2016-04-18T08:31:14.290Z: 51850 matches.

2016-04-18T08:31:15.149Z:
2016-04-18T08:31:15.149Z: Start: Results.Publish async Command 2016-04-18T08:31:15.149Z: [warning]Failed to publish test results: Could not read file (): ENOENT: no such file or directory, open '' 2016-04-18T08:31:15.149Z: End: Results.Publish async Command 2016-04-18T08:31:15.149Z:

nigurr commented 8 years ago

@tarunaroraonline it's available only in packages.json please let me know the same

tanvi-soni commented 8 years ago

Can you try using this in "test results files" field **/TEST-*.xml

tarunaroraonline commented 8 years ago

@tanvi-soni - Using */Test-.xml makes no difference.

[Debug] 2016-04-18T09:36:45.025Z: scriptPath: /home/AspectAdmin/aspectagent01/_work/10/s/vsts-experiments/vsts-logparser-wrapper.sh

[Debug] 2016-04-18T09:36:45.025Z: args: tests_console_output.txt TEST-report.xml

[Debug] 2016-04-18T09:36:45.025Z: cwd: /home/AspectAdmin/aspectagent01/_work/10/s

[Debug] 2016-04-18T09:36:45.025Z: failOnStandardError: false

[Debug] 2016-04-18T09:36:45.025Z:

[Debug] 2016-04-18T09:36:45.026Z: cwd: /home/AspectAdmin/aspectagent01/_work/10/s

[Debug] 2016-04-18T09:36:45.306Z: loading inputs and endpoints

[Debug] 2016-04-18T09:36:45.307Z: loading INPUT_SCRIPTPATH

[Debug] 2016-04-18T09:36:45.314Z: loading INPUT_ARGS

[Debug] 2016-04-18T09:36:45.315Z: loading INPUT_CWD

[Debug] 2016-04-18T09:36:45.315Z: loading INPUT_FAILONSTANDARDERROR

[Debug] 2016-04-18T09:36:45.315Z: loaded 4

[Debug] 2016-04-18T09:36:45.319Z: check path : /home/AspectAdmin/aspectagent01/_work/tasks/ShellScript/1.0.19/task.json

[Debug] 2016-04-18T09:36:45.320Z: set resource file to: /home/AspectAdmin/aspectagent01/_work/tasks/ShellScript/1.0.19/task.json

[Debug] 2016-04-18T09:36:45.321Z: system.culture=en-US

[Debug] 2016-04-18T09:36:45.328Z: check path : /usr/bin/bash

[Debug] 2016-04-18T09:36:45.328Z: bash=/usr/bin/bash

[Debug] 2016-04-18T09:36:45.329Z: cwd=/home/AspectAdmin/aspectagent01/_work/10/s

[Debug] 2016-04-18T09:36:45.330Z: path exists: /home/AspectAdmin/aspectagent01/_work/10/s

[Debug] 2016-04-18T09:36:45.330Z: scriptPath=/home/AspectAdmin/aspectagent01/_work/10/s/vsts-experiments/vsts-logparser-wrapper.sh

[Debug] 2016-04-18T09:36:45.331Z: check path : /home/AspectAdmin/aspectagent01/_work/10/s/vsts-experiments/vsts-logparser-wrapper.sh

[Debug] 2016-04-18T09:36:45.331Z: /usr/bin/bash pathArg: /home/AspectAdmin/aspectagent01/_work/10/s/vsts-experiments/vsts-logparser-wrapper.sh

[Debug] 2016-04-18T09:36:45.331Z: /usr/bin/bash literal arg: /home/AspectAdmin/aspectagent01/_work/10/s/vsts-experiments/vsts-logparser-wrapper.sh

[Debug] 2016-04-18T09:36:45.331Z: args=tests_console_output.txt TEST-report.xml

[Debug] 2016-04-18T09:36:45.331Z: /usr/bin/bash arg: tests_console_output.txt TEST-report.xml

[Debug] 2016-04-18T09:36:45.338Z: failOnStandardError=false

[Debug] 2016-04-18T09:36:45.338Z: exec tool: /usr/bin/bash

[Debug] 2016-04-18T09:36:45.338Z: Arguments:

[Debug] 2016-04-18T09:36:45.338Z: /home/AspectAdmin/aspectagent01/_work/10/s/vsts-experiments/vsts-logparser-wrapper.sh

[Debug] 2016-04-18T09:36:45.339Z: tests_console_output.txt

[Debug] 2016-04-18T09:36:45.340Z: TEST-report.xml

2016-04-18T09:36:45.340Z: [command]/usr/bin/bash /home/AspectAdmin/aspectagent01/_work/10/s/vsts-experiments/vsts-logparser-wrapper.sh tests_console_output.txt TEST-report.xml

[Debug] 2016-04-18T09:36:45.385Z: rc:0

[Debug] 2016-04-18T09:36:45.385Z: success:true

[Debug] 2016-04-18T09:36:45.393Z: task result: Succeeded

[Debug] 2016-04-18T09:36:46.030Z: testRunner: JUnit

[Debug] 2016-04-18T09:36:46.031Z: testResultsFiles: /home/AspectAdmin/aspectagent01/_work/10/s/*/TEST-.xml

[Debug] 2016-04-18T09:36:46.031Z: mergeTestResults: false

[Debug] 2016-04-18T09:36:46.031Z: testRunTitle:

[Debug] 2016-04-18T09:36:46.031Z: platform:

[Debug] 2016-04-18T09:36:46.031Z: configuration:

[Debug] 2016-04-18T09:36:46.031Z: publishRunAttachments: true

[Debug] 2016-04-18T09:36:46.031Z:

[Debug] 2016-04-18T09:36:46.032Z: cwd: /home/AspectAdmin/aspectagent01/_work/10/s

[Debug] 2016-04-18T09:36:46.316Z: loading inputs and endpoints

[Debug] 2016-04-18T09:36:46.322Z: loading INPUT_TESTRUNNER

[Debug] 2016-04-18T09:36:46.323Z: loading INPUT_TESTRESULTSFILES

[Debug] 2016-04-18T09:36:46.323Z: loading INPUT_MERGETESTRESULTS

[Debug] 2016-04-18T09:36:46.323Z: loading INPUT_PUBLISHRUNATTACHMENTS

[Debug] 2016-04-18T09:36:46.324Z: loaded 4

[Debug] 2016-04-18T09:36:46.325Z: testRunner=JUnit

[Debug] 2016-04-18T09:36:46.325Z: testResultsFiles=/home/AspectAdmin/aspectagent01/work/10/s/**/TEST-.xml

[Debug] 2016-04-18T09:36:46.326Z: mergeTestResults=false

[Debug] 2016-04-18T09:36:46.326Z: platform=null

[Debug] 2016-04-18T09:36:46.326Z: configuration=null

[Debug] 2016-04-18T09:36:46.326Z: testRunTitle=null

[Debug] 2016-04-18T09:36:46.326Z: publishRunAttachments=true

[Debug] 2016-04-18T09:36:46.326Z: testRunner: JUnit

[Debug] 2016-04-18T09:36:46.327Z: testResultsFiles: /home/AspectAdmin/aspectagent01/_work/10/s/_/TEST-.xml

[Debug] 2016-04-18T09:36:46.327Z: mergeResults: false

[Debug] 2016-04-18T09:36:46.327Z: platform: null

[Debug] 2016-04-18T09:36:46.328Z: config: null

[Debug] 2016-04-18T09:36:46.328Z: testRunTitle: null

[Debug] 2016-04-18T09:36:46.328Z: publishRunAttachments: true

[Debug] 2016-04-18T09:36:46.328Z: Pattern found in testResultsFiles parameter

[Debug] 2016-04-18T09:36:46.328Z: agent.buildDirectory=/home/AspectAdmin/aspectagent01/_work/10

[Debug] 2016-04-18T09:36:49.132Z: find /home/AspectAdmin/aspectagent01/_work/10

[Debug] 2016-04-18T09:36:49.132Z: 52017 matches.

2016-04-18T09:36:50.040Z:
2016-04-18T09:36:50.040Z: Start: Results.Publish async Command 2016-04-18T09:36:50.040Z: [warning]Failed to publish test results: Could not read file (): ENOENT: no such file or directory, open '' 2016-04-18T09:36:50.040Z: End: Results.Publish async Command 2016-04-18T09:36:50.040Z:

nigurr commented 8 years ago

Can you please tell me the agent version?

tarunaroraonline commented 8 years ago

It is 0.5.9 @nigurr

bryanmacfarlane commented 8 years ago

Latest test changes we're in 0.6.x

tarunaroraonline commented 8 years ago

How can I upgrade?

--Tarun

On 18 Apr 2016, at 18:21, Bryan MacFarlane notifications@github.com wrote:

Latest test changes we're in 0.6.x

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub

bryanmacfarlane commented 8 years ago

The docs cover that

tarunaroraonline commented 8 years ago

Bryan - can I update the agent from the agent control panel by right clicking the agent pool and choosing update all agents? Or do I need to reinstall the agent to upgrade?

bryanmacfarlane commented 8 years ago

The docs cover it under the setup section: https://github.com/Microsoft/vso-agent/blob/master/README.md

nigurr commented 8 years ago

@tarunaroraonline, you can't upgrade via UI. Reinstall or upgrade as per the doc.

There's compat issue with task version to agent version, which is fixed in latest 0.6 branch and will be released by today. after that try this out.

tarunaroraonline commented 8 years ago

@nigurr @bryanmacfarlane @tanvi-soni Thank you all. Upgrading the agent to the latest available version fixed the issue with test results not publishing. I am however disappointed that the functionality broke in the previous version and that we had no visibility that we were operating on an older version of the agent.

bryanmacfarlane commented 8 years ago

Awesome. Glad it's fixed.

The replacement for this agent will support updates. We are releasing a new preview tomorrow or early next week. It already has more features than this one

https://github.com/Microsoft/vsts-agent

sujitks commented 6 years ago

Hi @bryanmacfarlane, this issue is still there or might have come back in the latest release. My builds are failing for same reason after updating the agents to 2.124.0 version. Could you please help?

Following are the messages in the log:

2017-11-21T20:17:54.5822126Z ##[debug]Agent.Version=2.124.0
2017-11-21T20:17:54.5822126Z ##[debug]Unable to publish telemetry due to lower agent version.
2017-11-21T20:17:54.5822126Z ##[debug]task result: Failed
2017-11-21T20:17:54.5832125Z ##[error]VsTest task failed.
2017-11-21T20:17:54.5832125Z ##[debug]Processed: ##vso[task.issue type=error;]VsTest task failed.
2017-11-21T20:17:54.5832125Z ##[debug]Processed: ##vso[task.complete result=Failed;]VsTest task failed.