During my testing for our migration from MSTest meta nuget package to the new MSTest SDK, I noticed that Azure DevOps doesn't upload files anymore, which were added via MSTests TestContext.AddResultFile(myPath) method. It works when not using the new MSTest SDK. I found that the resulting .trx file has a slight change in where the node <ResultFiles> is placed.
Expected behavior
Old behavior (without MSTest SDK)
<ResultFiles> is placed under <UnitTestResult> on the same level as Output
Actual behavior
New behavior (with MSTest SDK)
<ResultFiles> is placed under <Output>
Additional context
I tried different settings and combinations in my Directory.Build.props. But they have no impact on the described bug.
I also tried to change (and shorten) the local folder which is used to save the files. But also no success.
I noticed another odd behavior, but I'm not sure if it is related. As you can see in the attached trx-files: The same test got way more entries now. The test itself didn't change. But each test (one test per datarow) gets all the resultfiles from the other datarows attached. But before examining this, I want to wait until the above bug is resolved
Describe the bug
During my testing for our migration from MSTest meta nuget package to the new MSTest SDK, I noticed that Azure DevOps doesn't upload files anymore, which were added via MSTests
TestContext.AddResultFile(myPath)
method. It works when not using the new MSTest SDK. I found that the resulting.trx
file has a slight change in where the node<ResultFiles>
is placed.Expected behavior
<ResultFiles>
is placed under<UnitTestResult>
on the same level asOutput
Actual behavior
<ResultFiles>
is placed under<Output>
Additional context
I tried different settings and combinations in my
Directory.Build.props
. But they have no impact on the described bug. I also tried to change (and shorten) the local folder which is used to save the files. But also no success.I noticed another odd behavior, but I'm not sure if it is related. As you can see in the attached trx-files: The same test got way more entries now. The test itself didn't change. But each test (one test per datarow) gets all the resultfiles from the other datarows attached. But before examining this, I want to wait until the above bug is resolved
Complete trx files