atoum Reports extension

Installs: 146 042

Dependents: 20

Suggesters: 0

Security: 0

Stars: 6

Watchers: 8

Forks: 6

Open Issues: 3


4.0.0 2021-02-05 14:58 UTC

This package is auto-updated.

Last update: 2023-03-05 19:19:00 UTC


Install it

Install extension using composer:

composer require --dev atoum/reports-extension

Enable the extension using atoum configuration file:


// .atoum.php

require_once __DIR__ . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php';

use atoum\atoum\reports;

$extension = new reports\extension($script);


Use it

HTML coverage report

Check out the demo report generated with atoum's test suite:

Add the following code to your configuration file:


// .atoum.php

use atoum\atoum\reports;
use atoum\atoum\reports\coverage;
use atoum\atoum\writers\std;


$coverage = new coverage\html();
$coverage->addWriter(new std\out());
$coverage->setOutPutDirectory(__DIR__ . '/coverage');

Branches and path coverage

If you want to generate branches and paths reports, you will have to install xDebug 2.3.0 or later:

php pickle.phar install xdebug

php -v

Once done, just use the -ebpc command line flag or add the following line of code to your configuration file:


// .atoum.php


Sonar coverage report

To add generic code coverage for sonar.

$xunit = new \atoum\atoum\reports\sonar\xunit();
$writer = new \atoum\atoum\writers\file('./sonar-xunit.xml');

$clover = new \atoum\atoum\reports\sonar\clover();
$writer = new \atoum\atoum\writers\file('./sonar-clover.xml');

and add report generate to sonar.genericcoverage properties


reports-extension is released under the BSD-3-Clause License. See the bundled LICENSE file for details.