• Stars
    star
    170
  • Rank 215,439 (Top 5 %)
  • Language
    PHP
  • Created over 10 years ago
  • Updated almost 8 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Smarter test runner for PHPUnit

Clever Test Runner for PHPUnit

Build Status Dependency Status Average time to resolve an issue Percentage of issues still open

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)

It’s probably not yet very stable but try it out.

What it does

Run a test suite once with errors

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:

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.

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

Configuration

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

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

    <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

More Repositories

1

functional-php

Primitives for functional programming in PHP
PHP
1,963
star
2

fxmlrpc

A modern, super fast XML/RPC client for PHP >=5.6
PHP
138
star
3

Procrastinator

Execute time consuming tasks as late as possible in a request
PHP
64
star
4

php-cld

PHP bindings for the Chrome Language Detector
PHP
53
star
5

phpunit-function-mocker

Allow mocking otherwise unmockable functions with PHPUnit
PHP
53
star
6

homebridge-prometheus-exporter

Prometheus metrics exporter for homebridge accessories
TypeScript
30
star
7

phpunit-dom-assertions

A work in progress, drop-in replacement for PHPUnit's deprecated DOM assertions.
PHP
29
star
8

pecl-mogilefs

Object-oriented PHP bindings for the MogileFS cluster file system written in C
C
23
star
9

uffff

Unicode input processing made trivial
PHP
19
star
10

prometheus-weathermen

A prometheus exporter for weather data
Rust
15
star
11

hmmmath

Delicious math for PHP
PHP
15
star
12

RuleDSL

PHP
14
star
13

EPHPMVC

A simple, yet very much extendable MVC implementation for PHP 5.3
PHP
10
star
14

ProcrastinatorBundle

Symfony2 integration for Procrastinator
PHP
8
star
15

ObjectConpherter

Object converter for PHP 5.3
PHP
8
star
16

php-nanotime

PHP bindings for libnanotime for nanosecond precision timestamps
C
8
star
17

symfony-reproducible-builds

A demo project to show and test reproducible builds with Symfony
PHP
7
star
18

nanotime

A small C library for nanosecond precise, cross platform timestamps
C
7
star
19

transform54

Transform PHP sources to use new 5.4 features
PHP
3
star
20

mashup-generator

The hacks that power usrportage.de
PHP
3
star
21

class-resolver

Intercepts PHPs "new" operator to execute a callback for name resolval
C
3
star
22

garnix

Nix
2
star
23

kesch

Caching code cata
PHP
2
star
24

prototype.php

Prototypal inheritance in PHP
PHP
2
star
25

.lars

dot-files dump
Shell
1
star
26

maintainer-tools

Random utilities that allow managing multiple OS projects in parallel
PHP
1
star
27

composer-data-donation

Small web form to survey constants and PHP extension info in the wild
HTML
1
star
28

scrypt-api

A convenience wrapper around php-scrypt
PHP
1
star
29

homebridge-ble-thermobeacon

Homebridge integration for Brifit/ORIA thermometer
TypeScript
1
star
30

pistis

Seed based pseudo-randomness generation
PHP
1
star
31

portuportu.com

1
star
32

homebridge-miele

Homebridge support for Miele appliances: https://github.com/nfarina/homebridge
JavaScript
1
star
33

prototype-generator.php

Generates prototypes via reflection for code completion for C extensions or automated wrapper/decorator generation
PHP
1
star
34

dyal

Dynamic asset loader to control loading of CSS and JS files
TypeScript
1
star