2017 © Pedro Peláez
 

library phpunit-clever-and-smart

A clever test runner for PHPUnit

image

lstrojny/phpunit-clever-and-smart

A clever test runner for PHPUnit

  • Monday, August 1, 2016
  • by lstrojny
  • Repository
  • 7 Watchers
  • 168 Stars
  • 79,290 Installations
  • PHP
  • 10 Dependents
  • 1 Suggesters
  • 12 Forks
  • 10 Open issues
  • 7 Versions
  • 4 % Grown

The README.md

Clever Test Runner for PHPUnit

Build Status Dependency Status Average time to resolve an issue Percentage of issues still open, (*1)

Mission

Enable fast feedback cycles by storing test case results in a database and reorder tests on consecutive runs in the following order: 1. Failures and errors 2. So far unrecorded tests 3. Remaining tests by execution time in ascendant order (fastest first), (*2)

It’s probably not yet very stable but try it out., (*3)

What it does

Run a test suite once with errors, (*4)

PHPUnit 3.7.28 by Sebastian Bergmann.

.............................................FSFS..............  63 / 280 ( 22%)
............................................................... 126 / 280 ( 45%)
............................................................... 189 / 280 ( 67%)
............................................................... 252 / 280 ( 90%)
.........................

Rerun that test suite and see how the previous failing tests have been sorted to the beginning of the test run:, (*5)

PHPUnit 3.7.28 by Sebastian Bergmann.

FSFS...........................................................  63 / 280 ( 22%)
............................................................... 126 / 280 ( 45%)
............................................................... 189 / 280 ( 67%)
............................................................... 252 / 280 ( 90%)
.........................

Installation

add the following line to your projects' composer.json require-dev section., (*6)

"lstrojny/phpunit-clever-and-smart": "0.*"

Configuration

To play around with it, add this to your phpunit.xml(.dist), (*7)

    <listeners>
        <listener class="PHPUnit\Runner\CleverAndSmart\TestListener">
            <arguments>
                <object class="PHPUnit\Runner\CleverAndSmart\Storage\Sqlite3Storage"/>
            </arguments>
        </listener>
    </listeners>

you might alter the location of the sqlite storage file, by passing a path to the Sqlite3Storage class:, (*8)

    <listeners>
        <listener class="PHPUnit\Runner\CleverAndSmart\TestListener">
            <arguments>
                <object class="PHPUnit\Runner\CleverAndSmart\Storage\Sqlite3Storage">
                    <arguments>
                        <string>/my/path/to/.phpunit-cas.db</string>
                    </arguments>
                </object>
            </arguments>
        </listener>
    </listeners>

Roadmap

  • Test it with as many test suites as possible
  • Stabilize
  • Merge into PHPUnit core

The Versions

01/08 2016

dev-master

9999999-dev

A clever test runner for PHPUnit

  Sources   Download

MIT

The Requires

 

The Development Requires

13/03 2014

0.5.0

0.5.0.0

A clever test runner for PHPUnit

  Sources   Download

MIT

The Requires

 

The Development Requires

19/01 2014

0.4.0

0.4.0.0

A clever test runner for PHPUnit

  Sources   Download

MIT

The Requires

 

The Development Requires

15/01 2014

0.3.0

0.3.0.0

A clever test runner for PHPUnit

  Sources   Download

MIT

The Requires

 

The Development Requires

14/01 2014

0.2.0

0.2.0.0

A clever test runner for PHPUnit

  Sources   Download

MIT

The Requires

 

The Development Requires

12/01 2014

0.1.0

0.1.0.0

A clever test runner for PHPUnit

  Sources   Download

MIT

The Requires

 

The Development Requires

12/01 2014

dev-pr/mutators

dev-pr/mutators

A clever test runner for PHPUnit

  Sources   Download

MIT

The Requires

 

The Development Requires