Request a PoCDownload
Product

Platform

All features32 capabilities, from IDE to CICompliance KitsISO 26262, DO-178C, IEC 62304...AI GovernanceControl AI-generated C/C++ codeWhat’s new in 2026Latest version highlightsScreenshotsSee the product in action

Analyze & improve

Coding standardsMISRA, CERT, CWE, AUTOSARArchitecture & dependenciesGraphs, matrix, cyclesTechnical debtMeasured in hours and dollarsQuality gatesStop regressions in CISmart Code CityYour codebase in 3D

Integrations

IDE pluginsVisual Studio, VS Code, CLion...CI/CD pipelinesJenkins, Azure DevOps, GitHub, GitLabSonarQube pluginC/C++ results in SonarQubeExternal analyzersClang-Tidy, Cppcheck, coverageFeature on Demand
Solutions

By need

Functional safetyCompliance kits per standardCoding standardsMISRA, CERT, AUTOSAR, ISO...Legacy modernizationRefactor large C/C++ safelyCode auditExpert review of your codebaseM&A due diligenceAssess technical health fast

By role

DevelopersSoftware architectsTech leadsDevOps engineersEngineering managersProject managers

CTOsCIOs / IT leadersQA engineersSecurity leadersComplianceConsultantsRequest a guided PoC
Industries

Safety-critical

AutomotiveISO 26262, MISRA, AUTOSARAerospace & DefenseDO-178C programsMedical DevicesIEC 62304 softwareEnergy & UtilitiesIEC 61508 systemsEmbedded SystemsFirmware and devices

Enterprise

Financial ServicesTrading and paymentsGame DevelopmentEngines and large C++Software VendorsCommercial C/C++ productsGovernmentAgencies and contractorsAll industries & case studies
Resources

Learn

DocumentationGuides, rules and CI setupKnowledge baseFrequently asked questionsBlogC and C++ code quality articlesRelease notesEvery version since 2009

Customers

Case studiesSuccess storiesTestimonialsWhat users sayOur customersCompanies using CppDependGold Code QualityOpen source projects we rate

Programs & company

Feature on DemandMissing features built for freeFree for open sourceLicenses for OSS and studentsContact usSales and supportEULALicense agreement
DocsPricing
Documentation

Code Metrics & Quality

Code Coverage

Improving Software Quality with Code Coverage in CppDepend

CppDepend integrates code coverage data to help you identify untested code, measure test effectiveness, and improve overall software quality. This section explains how to configure and import coverage data from various sources.

Supported Coverage Technologies

CppDepend can import coverage data from:

  • Bullseye coverage files
  • Cobertura
  • Visual Studio Team System
  • CTC++

XML Coverage Files from Visual Studio

Visual Studio has 2 coverage file formats.

  • A binary format where file extension is .coverage. This is the format you'll get from testing from Visual Studio. Alternatively you can also use the tool VSPerfMon.exe to get a .coverage file. For that you then need to instrument each project to cover with the tool VSInstr.exe used with the /Coverage option.
  • A XML format (with file extension .coveragexml since VS 2010, and .xml for previous versions)

CppDepend only consumes the XML format. You can manually export XML coverage files from binary coverage files from Visual Studio with this option:

Visual Studio Code Coverage Export

See the code snippet below, it takes 3 lines of code to programmatically transform a binary coverage file into a xml coverage file.

  • For that you'll need to reference from your project the assembly Microsoft.VisualStudio.Coverage.Analysis.dll:
    • A x86 version of this DLL can be found under C:\Program Files (x86)\Microsoft Visual Studio XX.0\Common7\IDE\PrivateAssemblies
    • A x64 version of this DLL can be found on x64 server where TFS is installed under C:\Program Files\Microsoft Team Foundation Server XX.0\Application Tier\TFSJobAgent\Plugins
  • Both System.Data and System.Data.DataSetExtensions will have to be referenced as well.
  • And if you want your code to be independent from any VS or TFS install, you'll need to deploy as well Microsoft.VisualStudio.Coverage.Interop.dll that is used by Microsoft.VisualStudio.Coverage.Analysis.dll.
using Microsoft.VisualStudio.Coverage.Analysis;
...
   var pathInBinary = @"C:\Dir\File.coverage";
   var pathOutXml = @"C:\Dir\File.coveragexml";
   var coverageInfo = CoverageInfo.CreateFromFile(pathInBinary);
   var data = coverageInfo.BuildDataSet();
   data.WriteXml(pathOutXml);

XML Coverage Files from CTC++

You can use the Ctc2cob tool which converts Testwell CTC++ reports into Cobertura-like XML reports.

Coverage Files Configuration

In VisualCppDepend menu: Project Properties > Analysis > Code Coverage > Settings

code coverage settings

Import Coverage Data

In VisualCppDepend menu: Coverage > Import Code Coverage Data

or

In VisualStudio menu: CppDepend > Coverage > Import Code Coverage Data

Import Code Coverage Data
Was this page helpful?Give feedbackRequest a feature