Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I've been meaning to write this as a guide and develop a plugin but I havent gotten around to it. I know this question is old but I'm SURE someone else out there wants the same thing so here it is.</p> <p>In the project configuration on Hudson:</p> <p><strong>Execute Windows batch command</strong></p> <pre><code> SET MSTest="C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\MSTest.exe" SET XSLParser="C:\MsBuildNunit\msxsl.exe" SET TestDLL=path-to-your-test-projects.dll SET TestOutFILE=TestResults\some-unique-filename.trx SET TransformedOutputFile=%TestOutFILE:.trx=%.xml SET XSLFile=c:\MsBuildNunit\MSBuild-to-NUnit.xslt MKDIR TestResults %MSTest% "/testcontainer:%TestDLL%" /nologo /resultsfile:%TestOutFILE% %XSLParser% %TestOutFILE% %XSLFile% -o %TransformedOutputFile% SET ERRORLEVEL=0 </code></pre> <p>Then check the box "Publish NUnit test result report" and for "Test report XMLs" enter </p> <pre><code>TestResults/*.xml</code></pre> <p>There is an XSLT in C:\MsBuildNunit as well as msxsl.exe which comes from Microsoft. </p> <p>You can download the MSBuild-to-NUnit.xslt from <strong><a href="http://www.86th.org/MSBuild-to-NUnit.xslt" rel="noreferrer">here</a></strong> and get msxsl.exe from microsoft <strong><a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=2FB55371-C94E-4373-B0E9-DB4816552E41&amp;displaylang=en" rel="noreferrer">here</a></strong> or you can just get the zipped copy of my MsBuildNunit folder that contains the xslt and exe <strong><a href="http://www.86th.org/MsBuildNunit.zip" rel="noreferrer">here</a></strong></p> <p>When run, it calls MSTest.exe which runs the tests and outputs the format in microsofts trx (xml) format. Then it calls msxsl.exe with the xslt and the trx and translates it to nunits xml format. At the end of the build, Hudson picks it up as any other Nunit test result and you are good to go.</p> <p>Edited to add: I forgot to mention, with this xslt we get full test results. We have multiple test projects and multiple dll's and we get great feedback with the ability to trend graph, view the tests by name, view the statuses of the tests, and if it errors we get the error message along with the stack trace. Basically almost everything that you would get with Nunit. </p> <p>Edit (again): I just now added the test duration in the transform so it will show up in Hudson now! Seems to work great for our tests.</p> <p>Edit: I tried the new MSTest plugin and it currently does not support parsing multiple TRX files, just 1, so currently this is your only solution if you are like us and have multiple test assemblies that you have to run through MSTest.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload