Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RunVSTest] Some test display names cause failures #543

Open
dfederm opened this issue Mar 9, 2024 · 0 comments
Open

[RunVSTest] Some test display names cause failures #543

dfederm opened this issue Mar 9, 2024 · 0 comments

Comments

@dfederm
Copy link
Member

dfederm commented Mar 9, 2024

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]

image

The test actually passes though, and you can see this by running dotnet test:

image

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant