I have step "Publish Test Results"
with "Test Result Format" - jUnit
with checked checkbox "Upload Test Attachments" .
And jUnit report with "system-out" node as discribed in documentation jUnit Attachment.
<testsuites>
<testsuite name="Test suit" timestamp="2016-07-10" hostname="localhost" time="116.509" errors="0" tests="40" skipped="0" disabled="0" failures="0">
<testcase classname="suit" name="name" time="0.649">
<system-out>
[[ATTACHMENT|./.tmp/protractor/somepage.png]]
</system-out>
</testcase>
</testsuite>
</testsuites>
But as result in Attachment no one file uploaded.
The "Upload Test Attachments" uploads the xml files you point the task to. My understanding is that the ATTACHMENT syntax above is an extension to JUnit. Uploading other test generated files is on our backlog - for now, you can use the Upload Artifacts task to save any files you may need.
@atinb yes, but it is pretty popular extension and supported in a lot of tools for example:
https://github.com/larrymyers/jasmine-reporters/pull/127
I did't find "Upload Artifacts" task in your repository.
If you mean "Publish Artifacts" task, then i didn't find way to load files to vsts log.
As i understood, you mean save files in any other place but not in vsts logs. Is it correct?
And second question, are you support uploading media files from any other report format?
Yes, sorry, meant Publish Build Artifacts task. Not sure what you mean with load files to vsts log. Publish Build Artifact will upload files and show them in the Artifacts tab in build summary as below
The only format that natively supports attachments is trx and we are supporting uploads of files using that. Thanks!
@atinb Is there an ETA for the uploading other test generated files? You said it's on your backlog, so I'm curious to know when we could expect this. I too am very interested in adding attachments to the test results. I have not found any way of doing that.
Just a note to others here, if you want to get artifacts into your nodejs tests, you can use the feature branch for https://github.com/bmancini55/node-trx/pull/5 and just update the associated trx exporter to specify the generated files.
No idea when that PR will be approved, but hope this helps while we wait for junit support.
i'm still looking the the feature attachment to the test result, it help me a lot while debug while test is failed
Same. Is this still on the roadmap?
+1
Any news on this?
+1
I am looking for a solution and haven't found any way yet for TestNG and JUnit for the problem. For .NET users is very simple as below just a line of code to solve.
TestContext.AddTestAttachment(@"C:\\Screenshot.Png");

Publishing artifacts does not resolve the issue because attachments are not associated with testing. Generating a bunch of loose files.
+1
I'm also trying to find a way to associate attachments when using nightwatch. The format is the same as @m-andrei but nothing gets uploaded and associated.
Hello :)
Did anybody find any solution about this issue?
Why is this issue closed?
I am getting the same error with @m-andrei
I run the tests in 2 steps:
_Step 1:_
I run the tests and when there is a failing test then a screenshot is taken and saved in an output folder (the configuration is not shown here, but you can rely on my words):
"test": "TEST_ENV=TEST codeceptjs run-multiple parallel --grep @smoked --reporter mocha-multi",
_Step 2:_
I merge the results, thus I get only one result.xml file that the Azure DevOps - Test Results Trend (Advanced) dashboard uses for showing a beautiful report:
"merge-results": "junit-merge -r -o output/result.xml -d output/"
The problem is that I don't get the screenshots of the failing tests, even though I see them attached in the result.xml file. So I basically see something like this:

@brahimiarlinda we ended up writing small C# utility that traverses the screenshots and uploads the files via the devops api to the appropriate test run, and have it run after the publish of test results
Most helpful comment
+1