PHPackages                             soyhuce/phpunit-to-cobertura - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. soyhuce/phpunit-to-cobertura

ActiveLibrary[Testing &amp; Quality](/categories/testing)

soyhuce/phpunit-to-cobertura
============================

Generates a cobertura code coverage report from phpunit

0.1.1(5y ago)15.6k3MITPHPPHP ^7.3

Since Sep 3Pushed 4y ago3 watchersCompare

[ Source](https://github.com/Soyhuce/phpunit-to-cobertura)[ Packagist](https://packagist.org/packages/soyhuce/phpunit-to-cobertura)[ RSS](/packages/soyhuce-phpunit-to-cobertura/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (2)Dependencies (2)Versions (3)Used By (0)

Generates a Cobertura xml report from phpunit
=============================================

[](#generates-a-cobertura-xml-report-from-phpunit)

[![Latest Version on Packagist](https://camo.githubusercontent.com/040ccd1df35b10bf7b2b4ffc4a010a3ccb8e91df75805b69c7908f30a23d1f66/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f736f79687563652f706870756e69742d746f2d636f626572747572612e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/soyhuce/phpunit-to-cobertura)[![GitHub Workflow Status](https://camo.githubusercontent.com/d0a3a9ad17464efec42ee0789bab25771a37ee7c3e438206d3675c9e80015af8/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f736f79687563652f706870756e69742d746f2d636f626572747572612f72756e2d74657374733f6c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/d0a3a9ad17464efec42ee0789bab25771a37ee7c3e438206d3675c9e80015af8/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f736f79687563652f706870756e69742d746f2d636f626572747572612f72756e2d74657374733f6c6162656c3d7465737473267374796c653d666c61742d737175617265)[![Total Downloads](https://camo.githubusercontent.com/2bfbb9c56478f746a71d5cc0b1af59a45f1dced0b945b2bb216a5d8cbfc8cebc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f736f79687563652f706870756e69742d746f2d636f626572747572612e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/soyhuce/phpunit-to-cobertura)

Some modern workflows need test coverage report to be generated with [Cobertura](http://cobertura.github.io/cobertura/). Phpunit does not support (yet ?) Cobertura report generation.

This project aims to solve this.

Installation
============

[](#installation)

Via composer :

```
composer require --dev soyhuce/phpunit-to-cobertura
```

That's all !

Generating a Cobertura coverage report
======================================

[](#generating-a-cobertura-coverage-report)

First, you need to run your phpunit tests with code coverage enabled. This needs to generate (at least) the code coverage in php format.

```

        src

```

Once done, you can convert the php code coverage into a Cobertura coverage.

```
./vendor/bin/phpunit-to-cobertura ./phpunit/codeCoverage.php ./phpunit/coberturaCoverage.xml

```

Support
=======

[](#support)

Fow now, only PHPUnit 9.3 is supported.

Contributing
============

[](#contributing)

You are welcome to contribute to this project ! Please see [CONTRIBUTING.md](CONTRIBUTING.md).

License
=======

[](#license)

This package is provided under the [MIT License](LICENSE.md)

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

2128d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/19587451?v=4)[SoyHuCe](/maintainers/SoyHuCe)[@Soyhuce](https://github.com/Soyhuce)

---

Top Contributors

[![bastien-phi](https://avatars.githubusercontent.com/u/10199039?v=4)](https://github.com/bastien-phi "bastien-phi (17 commits)")

###  Code Quality

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/soyhuce-phpunit-to-cobertura/health.svg)

```
[![Health](https://phpackages.com/badges/soyhuce-phpunit-to-cobertura/health.svg)](https://phpackages.com/packages/soyhuce-phpunit-to-cobertura)
```

###  Alternatives

[brianium/paratest

Parallel testing for PHP

2.5k136.1M979](/packages/brianium-paratest)[drupal/core-dev

require-dev dependencies from drupal/drupal; use in addition to drupal/core-recommended to run tests from drupal/core.

2022.6M341](/packages/drupal-core-dev)[webmozarts/strict-phpunit

Enables type-safe comparisons of objects in PHPUnit

30314.4k7](/packages/webmozarts-strict-phpunit)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
