views:

357

answers:

2

I have a strange problem,

my MSBuild runs tests, code-coverage and publishing fine (part of the build.txt shown):

   Results               Top Level Tests
   -------               ---------------
   Passed                BuildTestProject.UnitTest1.TestMethod1
   Passed                BuildTestProject.UnitTest1.TestMethod2
   2/2 test(s) Passed

   ...

   Results file:      W:\BuildWorkspace\XXX\Test Release\TestResults\XXX_XXX 2009-08-20 11_47_09_Any CPU_Release.trx
   Run Configuration: Local Test Run
   Waiting to publish...
   Publishing results of test run XXX@XXX 2009-08-20 11:47:09_Any CPU_Release to http://XXX:8080/Build/v1.0/PublishTestResultsBuildService2.asmx...
      ....Publish completed successfully.

When I import these testresults on my local machine i get to see the code coverage-data as expected. But the code-coverage details are not shown in the details of the build that Visual Studio shows when you expand the 'results details'.

Any tips?

A: 

Check that the .testrunconfig used by the server has coverage enabled. It may be different than your local .testrunconfig.

Aidan Ryan
No, i change the .testrunconfig myself, and i always set the coverage to true
Bart Janson
+1  A: 

Finally found the solution today, found out that my TeamFoundationServer itself had problems with publishing the results to my buildAgent. I read somewhere (after searching for CoverAn.exe) that it is installed as a service, then i checked the credentials for the service 'Code Coverage Analysis Service'. These were running under TFSMachine\NETWORK instead of our service-account for the TeamFoundationServer. Changed this, reran a build with tests in it and it now publishes the results.

W00t!

Bart Janson