DotCover TFS Extension

This article is about using the TFS Extension for DotCover which can be used in your build definition to run your tests.
DotCover Code Coverage Extension is an alternative to the power-shell script which is stored in the code repository, which is later used during the CI build to verify the unit/integration tests coverage in the project.
Build Agents - Prerequisites

Build Task Configuration

1. Add the task from the available list




2. Build Step 

 Place the task right next to your present dot cover PowerShell script.


3. Build Step configuration

Fill the following mandatory fields with the necessary information to get the tests running



4. Advanced configuration

This section specifically created for an advanced configuration where you like to different settings than the default ones. 
I have mentioned the default values which are inside the task, if you like to change any of the default paths please remove the "Default Value =" and fill in the desired configuration.


  • Excluded Assemblies - This is the assemblies which you don't like to cover as part of the analysis, you can always specify all the assemblies that you like to test in the Test Assemblies in the above mandatory section.
  • Report Type - Report type by default is HTML, another option here is XML which produces DetailedXML which can be used in conjunction with ReportGenerator.
  • VSTest Path - This is the path where the vstest.console.exe is placed in the system, default value here is as per the VS2017 installation path in most of the build agents, if any custom needs to mentioned please use this space.
  • DotCover.exe Path - This represents the directory where the dotcover.exe is present, the default value, for now, is "C:\BuildTools\dotcover.2018.1"
This extension doesn't have all the features of dot cover command line, it will be added based on the request.
Next version will add the functionality to auto download the dot cover from jetbrains.
At present this extension is in privately available in TFS marketplace if anybody likes to try it out I can share the marketplace link after standardizing the extension for general use I can make it public.
DotCover Commands 

Leave a Comment

No comments:

Powered by Blogger.