[DevExpress Support Team: CLONED FROM T824083: Test Runner – The Test Runner fails after updating Microsoft.NET.Test.Sdk from 16.2.0 to 16.3.0 0]
I have now found a possibly related issue in that Deployment Items don't copy correctly.
In the previously attached example solution if you add an XML file named "Test.xml" to each of the projects and set Copy to Output Directory to Copy Always. Add the following test to the test classes:
C#[TestMethod]
[DeploymentItem("Test.xml")]
public void DeploymentTest()
{
File.Exists("Test.xml").Should().BeTrue();
}
Running the test with TestRunner in the UnitTestErrorTests project results in an error similar to
Test Run deployment issue: Failed to copy file 'C:\Users\Chris\source\repos\UnitTestError\UnitTestErrorTests\bin\Debug\netcoreapp3.0\Test.xml' to 'C:\WINDOWS\system32\Test.xml': System.UnauthorizedAccessException: Access to the path 'C:\WINDOWS\system32\Test.xml' is denied.
Running the test in Visual Studio's Test Explorer works fine.
Chris,
Thank you for the update and such a detailed explanation. I was able to reproduce this issue and passed it to developers. Please bear with us.