R – MSBuild: build results shows ‘no code coverage’ while importing test-result does


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?

Best Solution

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.


Related Question