Report Formats
covdbg stores coverage results in a .covdb database file. You can export coverage to industry-standard formats using the convert command.
Coverage Database
.covdb is covdbg’s native format – a SQLite-based database containing detailed coverage information.
When to Use
- Primary storage for coverage results
- Input for the
mergecommand - Input for the
convertcommand
Creating a .covdb
# Run coverage and save results
covdbg --output "results.covdb" "tests.exe"Code language: PowerShell (powershell)
LCOV Format
LCOV is a widely-supported text-based format used by many CI/CD systems and coverage viewers.
When to Use
- Uploading to Codecov, Coveralls, or similar services
- Integration with CI/CD pipelines
- Viewing in LCOV-compatible tools
- Text-based reports that can be diffed
File Structure
LCOV files contain:
- Source file information (
SF:) - Function coverage (
FN:,FNDA:,FNF:,FNH:) - Line coverage (
DA:,LF:,LH:) - Branch coverage (if available)
Converting to LCOV
covdbg convert --input "results.covdb" --format LCOV --output "coverage.lcov"Code language: PowerShell (powershell)
Short Form
covdbg convert -i results.covdb -f LCOV -o coverage.lcovCode language: PowerShell (powershell)
Example Output
TN:
SF:C:\project\src\main.cpp
FN:10,main
FNDA:1,main
FNF:1
FNH:1
DA:10,1
DA:11,1
DA:12,1
DA:15,0
LF:4
LH:3
end_of_recordCode language: CSS (css)
GCOV Format
GCOV export produces one .gcov file per source file, compatible with GCC’s coverage format.
When to Use
- Integration with tools expecting GCOV format
- Detailed per-file coverage reports
- When you need individual file coverage data
File Naming
For each source file foo.cpp, covdbg creates foo.cpp.gcov in the output directory.
Converting to GCOV
# Create output directory first
New-Item -ItemType Directory -Force -Path "gcov-output"
# Convert
covdbg convert --input "results.covdb" --format GCOV --output "gcov-output\"Code language: PowerShell (powershell)
Short Form
mkdir gcov-output
covdbg convert -i results.covdb -f GCOV -o gcov-output\Code language: PowerShell (powershell)
Example Output
-: 0:Source:C:\project\src\main.cpp
-: 0:Programs:1
1: 10:int main() {
1: 11: int x = 0;
1: 12: x++;
#####: 15: unreached_code();Code language: PHP (php)
Format:
count:line:sourcewhere count is execution times-means non-executable line#####means never executed
Format Comparison
| Feature | .covdb | LCOV | GCOV |
|---|---|---|---|
| File type | Binary (SQLite) | Text | Text |
| Multiple files | Single file | Single file | Multiple files |
| Mergeable | Yes (merge) | Via external tools | Via external tools |
| Function coverage | Yes | Yes | Limited |
| Line coverage | Yes | Yes | Yes |
| Hit counts | Yes | Yes | Yes |
| CI integration | Custom | Excellent | Good |
Workflow Examples
CI Pipeline with Codecov
# Run tests with coverage
covdbg --output coverage.covdb tests.exe
# Export to LCOV for Codecov
covdbg convert -i coverage.covdb -f LCOV -o coverage.lcov
# Upload (example with Codecov CLI)
codecov --file coverage.lcovCode language: PowerShell (powershell)
Merge Multiple Test Runs
# Run different test suites
covdbg --output unit.covdb unit_tests.exe
covdbg --output integration.covdb integration_tests.exe
# Merge results
covdbg merge -i unit.covdb -i integration.covdb -o merged.covdb
# Export merged coverage
covdbg convert -i merged.covdb -f LCOV -o coverage.lcovCode language: PowerShell (powershell)
See Also
- CLI Reference – Command documentation
- GitHub Actions – CI integration