1
Vote

NUnit activity: Invalid test results file (.trx) created when the last character of test name is a period

description

The NUnit activity will create an invalid test results (.trx) file when the last character of the test name string is a period.

For example, if you set the test name using the NUnit TestCase attribute on a test method like the following:
[TestCase(TestName = "This is a test name that will cause the issue.")]
public void TestMethod()
{
    // Do some testing
}
The resulting .trx file will be produced with testName and name attributes set to empty string (testName="" and name="") for all tests that have a period as the last character in the test name.

This file will fail to publish to TFS, though no errors will be shown. You will simply not be able to view the test results. Additionally, if you attempt to open the file in Visual Studio, it will fail to load the file as an invalid format.

This affects the Oct., 2013 version of the Community TFS Build Extensions for Visual Studio 2010 (we are stuck on TFS 2010 for now), which appears to be the latest version for VS2010 (correct me if I'm wrong).

comments