atoum/reports-extension Build Status StyleCI

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 mageekguy\atoum\reports;

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


Use it

Telemetry report

The telemetry report allow us to collect metrics from your test suites. If you want to help us improve atoum, please send us your reports.

To enable the telemetry report, add the following code to your configuration file:


// .atoum.php

use mageekguy\atoum\reports;
use mageekguy\atoum\reports\telemetry;
use mageekguy\atoum\writers\std;


$telemetry = new telemetry();
$telemetry->addWriter(new std\out());

Now, each time your run your test suite, atoum will collect data and send them to the telemtry. By default, everything is sent anonymously: a random project name will be generated and we'll only collect metrics.

If you want to let us know who you are, add the following lines to your configuration file:


$telemetry->readProjectNameFromComposerJson(__DIR__ . '/composer.json');

// Or


The project name must be composer compliant.

With this configuration, atoum will send us everything about your project: the vendor name and the project name. If you want to keep the latter secret so we only collect the vendor name, you can add the following line:



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 mageekguy\atoum\reports;
use mageekguy\atoum\reports\coverage;
use mageekguy\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 \mageekguy\atoum\reports\sonar\xunit();
$writer = new \mageekguy\atoum\writers\file('./sonar-xunit.xml');

$clover = new \mageekguy\atoum\reports\sonar\clover();
$writer = new \mageekguy\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.