MSBuildSdks
MSBuildSdks copied to clipboard
[RunVSTest] Some test display names cause failures
To repro:
dotnet new mstest
dotnet add package Microsoft.Build.RunVSTest --prerelease
Then add this test:
[TestClass]
public class UnitTest1
{
[DataTestMethod]
[DataRow("Something error:")]
public void TestMethod1(string errorMessage)
{
Assert.IsNotNull(errorMessage);
}
}
Output:
RUNVSTESTTASK : Passed TestMethod1 (Something error : ) [< 1 ms]
The test actually passes though, and you can see this by running dotnet test
:
It seems like something about "Something error:" being in the test "name" (data tests have the data in the names by default) which is causing something to interpret the console spew as an error.
@novacole