承接 atoum/autoloop-extension 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

atoum/autoloop-extension

Composer 安装命令:

composer require atoum/autoloop-extension

包简介

Automatically run atoum's loop mode on file change

README 文档

README

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

Example

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

Demo

Install it

Install extension using composer:

composer require --dev atoum/autoloop-extension

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

<?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:

--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):

./vendor/bin/atoum --loop

Just run the tests like this:

./vendor/bin/atoum --autoloop

All your usual options are available.

Tips

Notifications

This extension works well with with atoum's notification.

//.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:

Demo

Links

Licence

autoloop-extension is released under the MIT License. See the bundled LICENSE file for details.

atoum

统计信息

  • 总下载量: 12.04k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 1

GitHub 信息

  • Stars: 3
  • Watchers: 7
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-01-13

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固