Code coverage does not work on TFS 2010 build server

We have a TFS 2010 setup with a dedicated build server. The design for my problem-solving solution is working fine, and it also correctly performs all the associated unit tests. The problem, however, is that the coverage code is not displayed (it works locally). I double checked the following things:

  • The build definition used has a "Test Impact Analysis" set to "true"
  • The TestSettings file specified in the Automated Tests / Test Builds section is Local.testsettings.
  • In the file "Local.testsettings" is included "Code coverage" (according to data and diagnostics) and ...
  • ... "Instrument components in place" are also configured with a re-signing of the key file (.snk)
  • I also tried changing the key file path to a UNC path on the build server, as I was not sure if it would be available there

Despite all the steps above, I can’t get code coverage that works for build on our TFS. A "summary" indicates that all tests were run successfully, and the next line reads "No code coverage results." The log file generated for the assembly itself does not even show the word β€œreach” anywhere, and I don’t understand why I, at least, don’t get an error message to work.

I read in some other posts that installation, at least VS2010 Premium, requires that it be installed on the build server, but I also read that failure to do this will result in a corresponding error message, so I expect that this is not the cause of my problems.

Any ideas or pointers in the right direction are welcome, thanks in advance

G.

+4
source share
1 answer

You need to install Visual Studio on the build server in order to be able to collect code coverage. Read a great article on how you can customize it.

+8
source

Source: https://habr.com/ru/post/1381136/


All Articles