Test results not available at link

Apr 13, 2010 at 2:58 PM

I'm using v1.1 beta of NUnit4TeamBuild to publish my NUnit test results to TFS 2008.  The The Result details in the Build Explorer for the build correctly list the summary, but clicking the link to view the TestResults document does not work.

NUnitTFS.exe executes without error:

C:\>C:\Builds\305\BuildType\NUnitTFS.exe -n "C:\Builds\305\Binaries\nunit_results.xml" -t "OIS System" -b "BuildDevelopment_20100413.4" -f "Release" -p "Any CPU" -o "NUnitOutput.trx" -x "C:\Builds\305\BuildType\NUnitToMSTest.xslt"
Transforming NUnit output...
Loading XSLT from C:\Builds\305\BuildType\NUnitToMSTest.xslt
Loading NUnit Output from C:\Builds\305\Binaries\nunit_results.xml
QueryBuilds
GetVersion
PrepareToPublish
Writing TRX file to \\bvlwbip168\Drops\BuildDevelopment_20100413.4\TestResults\0
7da040d-0835-1a00-91c4-30db1d215203\NUnitOutput.trx
PublishRun

It's clearly trying to save the .trx file to the correct file name.  The Drops share is located on the build server and Everyone has Full Control.

In the Drops folder Drops\BuildDevelopment_20100413.4\TestResults, there are 

  1. an empty folder named 07da040d-0835-1a00-91c4-30db1d215203 and 
  2. a .trx file named 07da040d-0835-1a00-91c4-30db1d215203.trx

I can open that .trx file manually in VS and it looks good.  But the file NUnitOutput.trx does not exist. If I manually copy 07da040d-0835-1a00-91c4-30db1d215203.trx to 07da040d-0835-1a00-91c4-30db1d215203\NUnitOutput.trx, the link from the Build Explorer still does not find the file.

I appreciate your tool integrating our NUnit test results with the Team Build output.  How can we get the last part to work so that my team doesn't have to manually browse to the .trx file?

Apr 14, 2010 at 8:18 AM

Hi,

The 07da040d-0835-1a00-91c4-30db1d215203.trx file is actually the one you want! TFS takes NUnitOutput.trx, adds some extra information to it, (can't remember exactly what off the top of my head but I believe it's stuff like times and a few IDs) and then saves it as {guid}.trx, i.e. 07da040d-0835-1a00-91c4-30db1d215203.trx in this case.

If you want the results to appear in the build page itself, well that's just not possible with TFS 2008 I'm afraid. You have to manually open the {guid}.trx file in Visual Studio. TFS 2010 might be different; I'm upgrading at the weekend so I'll check.

Cheers,

Kev

Apr 15, 2010 at 3:03 PM

It would be very helpful if the link in the "Result details" section on the build page worked.  When I click it, instead of opening the .trx file in a new VS tab, it pops up the "Browse For Folder" dialog for "Download Test Results".

To help the developers, I added the URL to the "Running NUnit Tests" message like:

    <BuildStep 
        TeamFoundationServerUrl="$(TeamFoundationServerUrl)" 
        BuildUri="$(BuildUri)" 
        Name="NUnitTestStep" 
        Message="Running NUnit Tests (see \\bvlwbip168\Drops\$(BuildNumber)\TestResults)      <Output TaskParameter="Id" PropertyName="NUnitStepId" />
    </BuildStep>
">

Thanks anyway!

Apr 15, 2010 at 3:07 PM

"It would be very helpful if the link in the "Result details" section on the build page worked." - complain to Microsoft about that one! Note that the dialog is not to browse for the results, it's to save the results to your local machine somewhere. Once you've picked a location it will open the results in Visual Studio.

Cheers,

Kev