2017 © Pedro Peláez
 

library fancy-testdox-printer

A fancy testdox printer for PHPUnit

image

rpkamp/fancy-testdox-printer

A fancy testdox printer for PHPUnit

  • Wednesday, May 9, 2018
  • by ScallioXTX
  • Repository
  • 3 Watchers
  • 31 Stars
  • 5,216 Installations
  • PHP
  • 7 Dependents
  • 0 Suggesters
  • 5 Forks
  • 0 Open issues
  • 11 Versions
  • 18 % Grown

The README.md

⛔ This package is deprecated, upgrade to PHPUnit 7+ and use phpunit --testdox instead! ⛔

Fancy Testdox Printer Build Status

A fancy testdox printer for PHPUnit. Output is similar to PHPUnit's --testdox output, but:, (*1)

  • Tests are more clearly marked as failing/passing by colored1 symbols
  • Failures/errors etc are shown inline instead of at the end of the test run for more clear and early feedback

PHPUnit compatibility

Major version Support
PHPUnit 5 Not supported
PHPUnit 6 Supported until February 2019
PHPUnit 7+ N/A, use built-in --testdox option

This printer is compatible with PHPUnit 6 only. PHPUnit 5 support has ended, so there are no plans to add support for it in this package., (*2)

In PHPUnit 7 the default testdox printer has been replaced with this printer. Therefore there is no version of this package that supports PHPUnit 7, nor will there ever be, as it is not needed. To obtain the same output in PHPUnit 7 run phpunit --testdox. If you also want to see the time each test took run phpunit --testdox -v., (*3)

During the support period for PHPUnit 6, which ends February 2019, this printer will receive support as well, but after that it will be abandoned., (*4)

Legend

Symbol Color Meaning
green test passed
red assertion failed
yellow PHPUnit error or warning
yellow incomplete test
yellow risky test
yellow skipped test

When less than 70% of the tests fail it will show a summary of errors at the end of the output. 70% is a guess and may change in the future, but it seemed like a nice cut off point that you have so much noise in the output already you don't need any more noise. (this was introduced in version 0.2.0), (*5)

Installation

On the command line run, (*6)

composer require rpkamp/fancy-testdox-printer --dev

to install this package as a development dependency, (*7)

Usage

To use this printer you can either pass a command line argument to PHPUnit or edit phpunit.xml, (*8)

Command line

On the command line run, (*9)

vendor/bin/phpunit --printer "rpkamp\FancyTestdoxPrinter"

phpunit.xml

In phpunit.xml add printerClass="rpkamp\FancyTestdoxPrinter" to the phpunit tag (see phpunit.xml for an example)., (*10)

Example output

The output of the test suite for this project using itself as a printer looks as follows:, (*11)

Own test suite, (*12)

(run vendor/bin/phpunit to obtain this output), (*13)

A possible output with failures, errors, etc looks as follows:, (*14)

Example output, (*15)

(run vendor/bin/phpunit --configuration phpunit.example.xml -v to obtain this output), (*16)

Note that without -v the risky, incomplete and skipped tests don't print additional information, (*17)

1 In case your terminal supports this and you have it enabled in PHPUnit, (*18)

The Versions

09/05 2018

dev-master

9999999-dev

A fancy testdox printer for PHPUnit

  Sources   Download

MIT

The Requires

 

The Development Requires

phpunit printer testdox

14/02 2018

dev-support-table

dev-support-table

A fancy testdox printer for PHPUnit

  Sources   Download

MIT

The Requires

 

The Development Requires

phpunit printer testdox

02/02 2018

dev-P5

dev-P5

A fancy testdox printer for PHPUnit

  Sources   Download

MIT

The Requires

 

The Development Requires

phpunit printer testdox

20/01 2018

0.2.5

0.2.5.0

A fancy testdox printer for PHPUnit

  Sources   Download

MIT

The Requires

 

The Development Requires

phpunit printer testdox

18/01 2018

0.2.4

0.2.4.0

A fancy testdox printer for PHPUnit

  Sources   Download

MIT

The Requires

 

The Development Requires

phpunit printer testdox

15/01 2018

0.2.3

0.2.3.0

A fancy testdox printer for PHPUnit

  Sources   Download

MIT

The Requires

 

The Development Requires

phpunit printer testdox

17/12 2017

0.2.2

0.2.2.0

A fancy testdox printer for PHPUnit

  Sources   Download

MIT

The Requires

 

The Development Requires

phpunit printer testdox

15/12 2017

0.2.1

0.2.1.0

A fancy testdox printer for PHPUnit

  Sources   Download

MIT

The Requires

 

The Development Requires

phpunit printer testdox

12/12 2017

0.2.0

0.2.0.0

A fancy testdox printer for PHPUnit

  Sources   Download

MIT

The Requires

 

The Development Requires

phpunit printer testdox

12/10 2017

0.1.1

0.1.1.0

A fancy testdox printer for PHPUnit

  Sources   Download

MIT

The Requires

 

The Development Requires

phpunit printer testdox

07/10 2017

0.1

0.1.0.0

A fancy testdox printer for PHPUnit

  Sources   Download

MIT

The Requires

 

The Development Requires

phpunit printer testdox