2017 © Pedro Peláez
 

library config-extension

atoum extension to use Yaml configuration files

image

atoum/config-extension

atoum extension to use Yaml configuration files

  • Monday, March 5, 2018
  • by agallou
  • Repository
  • 2 Watchers
  • 2 Stars
  • 477 Installations
  • PHP
  • 3 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 6 Versions
  • 8 % Grown

The README.md

atoum/config-extension Build Status

This extension will allow you to configure atoum using a YAML file and/or environnement variables., (*1)

Example

When using this extension, you can put a .atoum.yml on the root of your repository to configure atoum. Here is an exemple on how to tell atoum to look for unit tests in the tests/units/classes folder., (*2)

# .atoum.yml

atoum:
    directories:
        - ./tests/units/classes

Install it

Install extension using composer:, (*3)

composer require --dev atoum/config-extension

Enable the extension using atoum configuration file:, (*4)

<?php

// .atoum.php

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

use mageekguy\atoum\config;

$runner->addExtension(new config\extension($script));

// Or

new config\extension($script);

Use it

# .atoum.yml

atoum:
    directories:
        - ./tests/units/classes

    fields:
        report.default:
            - field.logo
            - field.logo.result
            - field.coverage

    reports:
        - report.default
        - report.coverage.clover

Configuration reference

atoum.loop

boolean : enable/disable atoum's loop mode. Defaults on ATOUM_LOOP environnement variable., (*5)

Exemple:, (*6)

atoum:
  loop: true

atoum.debug

boolean : enable/disable atoum's debug mode. Defaults on ATOUM_DEBUG environnement variable., (*7)

Exemple:, (*8)

atoum:
  debug: true

atoum.verbosity

integer : value between 1 and 3 determining atoum's verbosity level'. Defaults on ATOUM_VERBOSITY environnement variable., (*9)

Exemple:, (*10)

atoum:
  verbosity: 2

atoum.directories

array : List of directories where atoum will look for unit tests. Defaults on ATOUM_DIRECTORIES environnement variable (a coma separated list of directories)., (*11)

atoum:
    directories:
        - ./tests/units/classes

atoum.reports

array : List of reports. Defaults on ATOUM_REPORTS environnement variable (a coma separated list of reports)., (*12)

Example:, (*13)

atoum:
    reports:
        - report.default
        - report.coverage.clover

Possible values :, (*14)

report.default

adds atoum's default reporter (when the reports key is defined, atoum's default reporter is no longer used)., (*15)

report.coverage.clover

Adds a clover coverage reporter., (*16)

Path to were the report will be written could be configured using the coverage.clover.filename parameter., (*17)

report.xunit

Adds an xUnit reporter., (*18)

Path to were the report will be written could be configured using the xunit.filename parameter., (*19)

report.tap

Adds a TAP reporter., (*20)

report.vim

Adds a vim reporter., (*21)

report.nyancat

Adds a reporter that displays a nyancat., (*22)

report.santa

Adds a santa reporter., (*23)

atoum.fields

Fields allows you to customize reports. You can add fields for each report., (*24)

You need to add the report name as key, then add an array of fields., (*25)

This example adds the logo field to the default report :, (*26)

atoum:
    reports:
        - report.default

    fields:
        report.default:
            - field.logo

Displays atoum's logo at the begining of the report. Only works on cli reports., (*27)

field.logo.result

Displays atoum's logo at the end of the report. Only works on cli reports., (*28)

field.coverage.html

Generate an HTML coverage reports. Needs the php extension xdebug to be installed., (*29)

The project name in generated report and folder where the report will be generated could by configured with the project.name and coverage.html.directory and parameters., (*30)

parameters

You can customize the way reports or fields are generated using the parameters section on the .atoum.yml file., (*31)

Here is an example that changes the path where the xunit report is generated:, (*32)

atoum:
    reports:
        - report.xml
parameters:
    xunit.filename: "mylogs/file.xml"

xunit.filename

Default value : xunit.xml., (*33)

Path were the xUnit report will be written in the report.xunit report., (*34)

The directory where the file is generated must exists, it will not be created by atoum., (*35)

coverage.html.directory

Default value : ./coverage., (*36)

Path to the folder where the HTML coverage files will be written. See field.coverage.html field., (*37)

project.name

Default value : atoum., (*38)

Will be used when generating the field.coverage.html field., (*39)

coverage.clover.filename

Default value : clover.xml., (*40)

Path where the clover report will be written in the report.clover report., (*41)

License

config-extension is released under the BSD-3-Clause License. See the bundled LICENSE file for details., (*42)

atoum, (*43)

The Versions

05/03 2018

dev-master

9999999-dev http://www.atoum.org

atoum extension to use Yaml configuration files

  Sources   Download

BSD BSD-3-Clause

The Requires

 

by Avatar jubianchi

tdd test config unit testing atoum atoum-extension

05/03 2018

0.3.0

0.3.0.0 http://www.atoum.org

atoum extension to use Yaml configuration files

  Sources   Download

BSD-3-Clause

The Requires

 

by Avatar jubianchi

tdd test config unit testing atoum atoum-extension

22/05 2017

0.2.0

0.2.0.0 http://www.atoum.org

atoum extension to use Yaml configuration files

  Sources   Download

BSD

The Requires

 

by Avatar jubianchi

tdd test config unit testing atoum atoum-extension

13/11 2016

0.1.0

0.1.0.0 http://www.atoum.org

atoum extension to use Yaml configuration files

  Sources   Download

BSD

The Requires

 

by Avatar jubianchi

tdd test config unit testing atoum atoum-extension

13/11 2016

dev-ci-deps-compat

dev-ci-deps-compat http://www.atoum.org

atoum extension to use Yaml configuration files

  Sources   Download

BSD

The Requires

 

by Avatar jubianchi

tdd test config unit testing atoum atoum-extension

11/11 2016

dev-jubianchi-patch-1

dev-jubianchi-patch-1 http://www.atoum.org

atoum extension to use Yaml configuration files

  Sources   Download

BSD

The Requires

 

by Avatar jubianchi

tdd test config unit testing atoum atoum-extension