--- id: lcov-cobertura version: "2.1.1" license: Apache License, Version 2.0 license_treatment: permissive maintenance: aging --- # lcov-cobertura — LCOV to Cobertura XML converter License: permissive · Maintenance: aging · Downloads: 1.1M/mo ## What it is and what it does lcov_cobertura is a format converter that reads code coverage data in lcov format and transforms it into Cobertura XML format. It preserves coverage metrics at multiple levels: package/folder, class/file, function, and individual line and branch coverage. You can use it as a command-line tool to batch-convert coverage files, or import it as a Python module to integrate coverage transformation into your build pipeline. It supports filtering packages by regex, specifying custom source directories, and optionally demangling C++ function names. The package supports Python 3.8+. Use it for: - Convert lcov reports to Cobertura XML for CI server integration and build stability tracking - Aggregate coverage metrics from multiple test runs into a single standardized format - Filter and exclude test packages from coverage reports before submitting to CI systems - Demangle C++ function names in coverage reports for more readable dashboards - Integrate coverage conversion into build scripts without adding heavy external dependencies ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Converts code coverage reports from lcov format to Cobertura XML format, enabling CI servers to aggregate and analyze coverage metrics across packages, classes, functions, and individual lines. Yes, if you use lcov-based coverage tools and need to feed results into a system that expects Cobertura XML. The package is lightweight, stable, and has no security vulnerabilities. The 538-day gap since last release is not a concern given the narrow, stable scope of format conversion. ## Install pip install lcov-cobertura uv add lcov-cobertura poetry add lcov-cobertura ## Installing lcov-cobertura Before you install: Low install friction with a single lightweight runtime dependency (importlib-metadata). Package is aging (538 days since last release) but marked Production/Stable with latest release on 2025-02-22. License in practice: Licensed under Apache License, Version 2.0 (permissive), allowing free use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects. Quickstart: pip install lcov_cobertura from lcov_cobertura import LcovCobertura LCOV_INPUT = 'SF:foo/file.ext\nDA:1,1\nDA:2,0\nend_of_record\n' converter = LcovCobertura(LCOV_INPUT) cobertura_xml = converter.convert() print(cobertura_xml) Requires Python 3.8 or later. Optional C++ demangling requires the c++filt system utility. Verify before relying: - Actual maintenance activity and community engagement beyond the release date - Performance characteristics with large lcov files - Completeness of coverage metric support beyond documented metrics ## Package facts - License: Apache License, Version 2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: aging - Downloads: 1.1M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags lcov to cobertura converter, code coverage format conversion, lcov xml converter, coverage report aggregation, cobertura xml generator, coverage metrics transformation, coverage integration, coverage-reporting, ci-integration, build-tools [View on SkillFed](https://skillfed.io/packages/lcov-cobertura) · [View on PyPI](https://pypi.org/project/lcov-cobertura/)