Geeks With Blogs
Solid development Don’t make excuses for code, let it speak for itself
This article describes how to integrate NUnit tests into the TFS build. It also supplies a link to a XSLT file for the conversion between the NUnit results to an MSTest format.

The result is great; in the details of the Build Explorer you will see the number of Passed, Failed and Other Result tests. However, when you click the results you will see that any 'Other Result' tests (tests with for instance the IgnoreAttribute) will show up as 'Failed' tests. Also the Quality Indicators graph will show them as 'Failed' tests.

I've edited the XSLT file to solve this; around line 157 I've changed the 'xsl:choose' to:

<xsl:attribute name="outcome">
   <xsl:choose >
      <xsl:when test="@success='True'">
         <xsl:value-of select="'Passed'"/>
      <xsl:when test="@executed='False'">
         <xsl:value-of select="'Inconclusive'"/>
         <xsl:value-of select="'Failed'"/>

Now not only the count works correctly, also the test details and quality indicators graph shows them as 'Inconclusive'.

Ps. I assume the possible values of 'outcome' are listed in Microsoft.VisualStudio.TestTools.Common.TestOutcome (located in C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\Microsoft.VisualStudio.QualityTools.Common.dll) Posted on Thursday, November 5, 2009 10:02 AM Team Build | Back to top

Comments on this post: Inconclusive / ignored tests converted from NUnit to MSTest correctly

No comments posted yet.
Your comment:
 (will show your gravatar)

Copyright © martin | Powered by: