microsoft / microsoft/MSBuildSdks
[RunVSTest] Some test display names cause failures
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 508
- Forks
- 94
- Avg merge
- 6h 40m
- Merged PRs (30d)
- 2
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with the shown MSTest project, Microsoft.Build.RunVSTest prerelease package, and the data row containing a colon; compare its output with dotnet test. Start by tracing how the RunVSTest task interprets test display names and console output. Done means the test is reported as passed without treating the display name as an error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- build-system, testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100