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 today

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 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity40

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

2074d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/206cfbf866a463f7e7d1e86946d59b82f4191b9c89f9981fb03eeb264d77af79?d=identicon)[SoyHuCe](/maintainers/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

[orchestra/testbench

Laravel Testing Helper for Packages Development

2.2k39.1M32.0k](/packages/orchestra-testbench)[timacdonald/log-fake

A drop in fake logger for testing with the Laravel framework.

4235.9M54](/packages/timacdonald-log-fake)[jasonmccreary/laravel-test-assertions

A set of helpful assertions when testing Laravel applications.

3513.9M32](/packages/jasonmccreary-laravel-test-assertions)[ergebnis/phpunit-slow-test-detector

Provides facilities for detecting slow tests in phpunit/phpunit.

1468.1M72](/packages/ergebnis-phpunit-slow-test-detector)[typo3/testing-framework

The TYPO3 testing framework provides base classes for unit, functional and acceptance testing.

675.0M774](/packages/typo3-testing-framework)[robiningelbrecht/phpunit-pretty-print

Prettify PHPUnit output

76460.0k15](/packages/robiningelbrecht-phpunit-pretty-print)

PHPackages © 2026

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