2017 © Pedro Peláez
 

library autoloop-extension

Automatically run atoum's loop mode on file change

image

atoum/autoloop-extension

Automatically run atoum's loop mode on file change

  • Wednesday, October 25, 2017
  • by agallou
  • Repository
  • 7 Watchers
  • 3 Stars
  • 7,122 Installations
  • PHP
  • 0 Dependents
  • 1 Suggesters
  • 2 Forks
  • 1 Open issues
  • 14 Versions
  • 1 % Grown

The README.md

atoum/autoloop-extension Build Status

autoloop-extension allows you automatically run your tests in atoum's loop mode when files are changed., (*1)

Example

Here is an example: we can see that the test files are automatically executed when the classes and test classes are changed., (*2)

Demo, (*3)

Install it

Install extension using composer:, (*4)

composer require --dev atoum/autoloop-extension

Then, the only thing you have to do is to set the watched files like this:, (*5)

<?php
// .atoum.php

$runner
    ->getExtension(atoum\atoum\autoloop\extension::class)
        ->setWatchedFiles(array(__DIR__ . '/src'))
;

Use it

When the extension is loaded a new option is available:, (*6)

--autoloop: Automatically relaunch tests on file change (implies --loop)

So, instead of launch the loop mode like this (an having to press enter each time you want to run the tests):, (*7)

./vendor/bin/atoum --loop

Just run the tests like this:, (*8)

./vendor/bin/atoum --autoloop

All your usual options are available., (*9)

Tips

Notifications

This extension works well with with atoum's notification., (*10)

//.atoum.php

$report = $script->addDefaultReport();

$notifier = new atoum\report\fields\runner\result\notifier\image\libnotify();

$notifier
    ->setSuccessImage(__DIR__ . '/vendor/atoum/atoum/resources/images/logo/success.png')
    ->setFailureImage(__DIR__ . '/vendor/atoum/atoum/resources/images/logo/failure.png')
;

$report
    ->addField($notifier)
;

With a setup like this, you will not even have to look at your console to see your test results. Here is what it looks like:, (*11)

Demo, (*12)

Licence

autoloop-extension is released under the MIT License. See the bundled LICENSE file for details., (*13)

atoum, (*14)

The Versions

25/10 2017

dev-master

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

Automatically run atoum's loop mode on file change

  Sources   Download

MIT

The Requires

 

by Adrien Gallou

tdd test unit testing atoum atoum-extension

24/02 2017

0.3.0

0.3.0.0 http://www.atoum.org

Automaticly run atoum's loop mode on file change

  Sources   Download

MIT

The Requires

 

by Adrien Gallou

tdd test unit testing atoum atoum-extension

24/02 2017

dev-update-atoum-3

dev-update-atoum-3 http://www.atoum.org

Automaticly run atoum's loop mode on file change

  Sources   Download

MIT

The Requires

 

by Adrien Gallou

tdd test unit testing atoum atoum-extension

16/02 2017

0.2.0

0.2.0.0 http://www.atoum.org

Automaticly run atoum's loop mode on file change

  Sources   Download

MIT

The Requires

 

by Adrien Gallou

tdd test unit testing atoum atoum-extension

13/11 2016

dev-jubianchi-patch-1

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

Automaticly run atoum's loop mode on file change

  Sources   Download

MIT

The Requires

 

by Adrien Gallou

tdd test unit testing atoum atoum-extension

13/11 2016

dev-self_register

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

Automaticly run atoum's loop mode on file change

  Sources   Download

MIT

The Requires

 

by Adrien Gallou

tdd test unit testing atoum atoum-extension

13/11 2016

dev-Hywan-patch-2

dev-Hywan-patch-2 http://www.atoum.org

Automaticly run atoum's loop mode on file change

  Sources   Download

MIT

The Requires

 

by Adrien Gallou

test unit testing atoum

29/05 2016

0.1.0

0.1.0.0 http://www.atoum.org

Automaticly run atoum's loop mode on file change

  Sources   Download

MIT

The Requires

 

by Adrien Gallou

test unit testing atoum

08/05 2016

dev-doc_notifications

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

Automaticly run atoum's loop mode on file change

  Sources   Download

MIT

The Requires

 

by Adrien Gallou

test unit testing atoum

15/03 2016

dev-Hywan-patch-1

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

Automaticly run atoum's loop mode on file change

  Sources   Download

MIT

The Requires

 

by Adrien Gallou

test unit testing atoum

15/03 2016

dev-looper_interface

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

Automaticly run atoum's loop mode on file change

  Sources   Download

MIT

The Requires

 

by Adrien Gallou

test unit testing atoum

25/01 2016

0.0.2

0.0.2.0 http://www.atoum.org

Automaticly run atoum's loop mode on file change

  Sources   Download

MIT

The Requires

 

by Adrien Gallou

test unit testing atoum

15/01 2016

dev-use_lopp_configuration

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

Automaticly run atoum's loop mode on file change

  Sources   Download

MIT

The Requires

 

by Adrien Gallou

test unit testing atoum

14/01 2016

0.0.1

0.0.1.0 http://www.atoum.org

Automaticly run atoum's loop mode on file change

  Sources   Download

MIT

The Requires

 

by Adrien Gallou

test unit testing atoum