PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Sunday, October 9, 2022

[FIXED] What constitutes full code coverage when I invoke dotCover from an MSTest build step in TeamCity?

 October 09, 2022     continuous-integration, dotcover, teamcity     No comments   

Issue

What is considered 100% when I invoke dotCover from an MSTest build step in TeamCity? Is 100% all of the compiled code? Is it all the code for all the assemblies which the tests have touched? Is it all the classes which the tests have touched?

When I invoke dotCover from a TeamCity MSTest build step which runs My.Tests.dll, which lines are code are being tracked?


Solution

dotCover only provides reporting on statement-level coverage, where as other tools like NCover also include function and branch coverage.

With a TeamCity MSTest build step you get to specify which assemblies you want the coverage reported for in the "Filters" field. This allows you to just specify an exclude for a .Tests pattern or just include one assembly. See the TeamCity documentation for more details: http://confluence.jetbrains.net/display/TCD7/JetBrains+dotCover

I believe that if you don't specify any filters, all code in all assemblies that were loaded into the CLR are included (you have to cause an assembly load from the code you call, so some assemblies might not be included, this is just the lazily loading of the CLR). This is because tools like dotCover use the CLR profiling API and do not instrument your code upfront. Note that dotCover will exclude assemblies from the GAC.



Answered By - Jonathon Rossi
Answer Checked By - Mary Flores (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing