1

Closed

MSTestProvider: Emit Description, Owner and Properties from a TestMethod into the XML File

description

If you use the MSTest Provider you can put addtional Attributes on a TestMethod which gets emitted by MSTest.exe into the results file. I need the same ability in StatLight when running UnitTests with the MSTest Provider.
Example:
    [TestMethod]
    [Owner("Georg Drobny")]
    public void NullInstance()
    { }

    [TestMethod]
    [Description("This test checks that the designer data is OK")]
    [Owner("Georg Drobny")]
    public void VerifyHistory()
    {}
 
Here's some sample output from the MSTEST.exe rsults file:
  • <UnitTest name="CreateUserRoleThrowsOnEmptyUserRole" storage="..." id="3710b1ce-1b45-bde5-96d9-2db9cfc2b4ae">
    <Description>Tests if CreateUserRole throws on empty user role.</Description>
  • <Owners>
    <Owner name="owner" />
    </Owners>
  • <Properties>
  • <Property>
    <Key>TestCaseInternalTcId</Key>
    <Value>{0B51FBFA-B2E0-43A3-B5A9-B361B31FF6BA}</Value>
    </Property>
  • <Property>
    <Key>TestCaseRequirement</Key>
    <Value>2110</Value>
    </Property>
  • <Property>
    <Key>TestCaseName</Key>
    <Value>[UserManagementServiceTests] CreateUserRoleThrowsOnEmptyUserRole</Value>
    </Property>
    </Properties>
Closed Jun 25, 2011 at 3:25 PM by staxmanade
No Response

comments

staxmanade wrote May 31, 2011 at 1:27 PM

I've added support for this, but am not sure if it can be exported in the generic test summary results. http://msdn.microsoft.com/en-us/library/ms243174(VS.100).aspx

The following is an example of the StatLight results output http://codepaste.net/xor4pu Take a look at the metaDataItems/metaData nodes...

wrote Jun 25, 2011 at 3:25 PM

wrote Feb 14, 2013 at 8:17 PM

wrote May 16, 2013 at 9:50 AM