This PR introduces extends testcase with an attachments array. Currently supported for the following implementations:
[ ] Cucumber
[x] JUnit
[x] MSTest
[x] NUnit
[ ] XUnit (not supported)
A few implementation notes:
JUnit:
Based on the Jenkins Plugin Attachment plugin which inspects the <system.out> property in the XML for the following syntax: [[ATTACHMENT|/absolute/path/tofile.png]]
I have confirmed that the azure-devops build-agent test publisher uses this convention as well. The path can be an absolute path or relative to the location of the test results xml.
MSTest:
Attachments appear in the xml under the test result for a given execution:
Calls to TestContext.AddResultFile(filename) copies the file into a special folder per test, which is a combination of TestRun name + Test Execution id + Machine Name, relative to the location of the test results xml file.
The test-parser mstest implementation expands out the relative path from the XML into a value that can be resolved at runtime relative to the test results xml file.
NUnit:
Very straight-forward as NUnit only accepts absolute paths.
This PR introduces extends testcase with an attachments array. Currently supported for the following implementations:
XUnit(not supported)A few implementation notes:
JUnit:
Based on the Jenkins Plugin Attachment plugin which inspects the
<system.out>
property in the XML for the following syntax:[[ATTACHMENT|/absolute/path/tofile.png]]
I have confirmed that the azure-devops build-agent test publisher uses this convention as well. The path can be an absolute path or relative to the location of the test results xml.
MSTest:
Attachments appear in the xml under the test result for a given execution:
Calls to
TestContext.AddResultFile(filename)
copies the file into a special folder per test, which is a combination of TestRun name + Test Execution id + Machine Name, relative to the location of the test results xml file.The test-parser mstest implementation expands out the relative path from the XML into a value that can be resolved at runtime relative to the test results xml file.
NUnit:
Very straight-forward as NUnit only accepts absolute paths.
Addresses:
49