vw-extension makes your atoum failing test cases succeed under CI tools scrutiny
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
classes
doc
tests/units/classes
.atoum.php
.bootstrap.atoum.php
.gitignore
.travis.yml
LICENSE
README.md
autoloader.php
composer.json

README.md

atoum/vw-extension

vw-extension makes atoum failing test cases succeed in continuous integration tools.

Inspired by phpunit-vw.

Example

Here are the results of running the extension test in different environments:

namespace mageekguy\atoum\vw\tests\units;

use mageekguy\atoum;

class extension extends atoum\test
{
    private $noxEmissions = 12000;

    private $legalLimit = 300;

    public function testEnvironmentalImpactCompliance()
    {
        $this->integer($this->noxEmissions)->isLessThan($this->legalLimit);
    }
}

Running in development environment: Failing in dev environment

Running in CI environment: Build Status

Succeeded in CI environment

Install it

Install extension using composer:

composer require --dev atoum/vw-extension:~1.0

Enable the extension using atoum configuration file:

<?php

// .atoum.php

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

$runner->addExtension(new \mageekguy\atoum\vw\extension($script));

CI tools detection

Currently detects :

  • TravisCI
  • Appveyor
  • Bamboo
  • Buildkite
  • CircleCI
  • CodeShip
  • GitlabCI
  • Go CD
  • Hudson
  • Jenkins
  • PHPCI
  • TeamCity

Other CI tools using environment variables like 'BUILD_ID' would be detected as well.

License

vw-extension is available under the MIT License.