Test result names aren't properly published to tfs / trx
sirotnikov opened this issue · comments
TFS was complaining about missing test names.
I traced it down to what appears to be an omission in XmlTestResultParses.cs:91
private TestResult ParseTestResult(XmlNode testcaseNode)
{
string className = testcaseNode.Attributes["classname"].InnerText;
string testCaseName = testcaseNode.Attributes["name"].InnerText;
string qualifiedName = className + "." + testCaseName;
[...]
TestResult testResult = new TestResult(testCase)
{
ComputerName = Environment.MachineName,
91: DisplayName = " "; // shouldn't this be DisplayName = qualifiedName ?
};
Is this a mistake or is there some reason for it?
There's indeed a reason - information in VS' details pane is rather redundant, so we wanted to use the space occupied by the DisplayName
for other information (i.e., clearly point out to the user if a test has crashed). However, that DisplayName is also used when running tests via VsTest.Console.exe (which I happened to find out last night), so that's apparently not an option.
I will commit a fix in the next minutes. We will release a fixed version as soon as we have figured out #21 .