Coder Social home page Coder Social logo

scriptfusion / phpunit-immediate-exception-printer Goto Github PK

View Code? Open in Web Editor NEW
35.0 4.0 6.0 206 KB

:fax: Immediately prints exception and assertion failures during testing.

License: GNU Lesser General Public License v3.0

PHP 100.00%
phpunit phpunit-printer exception-printer testing

phpunit-immediate-exception-printer's People

Contributors

bilge avatar peter279k avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

phpunit-immediate-exception-printer's Issues

Generate timing report

After running the tests, a summary of tests that ran longer than a given amount of time would be nice.

Exception messages don't wrap properly

The exception message output format is pretty bad because it intersects the exception type box if the message wraps. We should come up with better exception formatting design. Maybe copy Symfony's console exception style?

Call to undefined method PHPUnit_Extensions_Selenium2TestCase_WebDriverException::getPreviousWrapped()

I get this error when trying to run Selenium test case with your reporter:

Error: Call to undefined method PHPUnit_Extensions_Selenium2TestCase_WebDriverException::getPreviousWrapped() in /opt/versionpress/vendor/scriptfusion/phpunit-immediate-exception-printer/src/Printer.php:159
Stack trace:
#0 /opt/versionpress/vendor/scriptfusion/phpunit-immediate-exception-printer/src/Printer.php(103): ScriptFUSION\PHPUnitImmediateExceptionPrinter\PhpUnit5Printer->writeException(Object(PHPUnit_Extensions_Selenium2TestCase_WebDriverException))
#1 /opt/versionpress/vendor/scriptfusion/phpunit-immediate-exception-printer/src/PhpUnit5Printer.php(26): ScriptFUSION\PHPUnitImmediateExceptionPrinter\PhpUnit5Printer->onEndTest(Object(PHPUnit_Framework_TestSuite), 0)
#2 /opt/versionpress/vendor/phpunit/phpunit/src/Framework/TestResult.php(399): ScriptFUSION\PHPUnitImmediateExceptionPrinter\PhpUnit5Printer->endTest(Object(PHPUnit_Framework_TestSuite), 0)
#3 /opt/versionpress/vendor/phpunit/phpunit/src/Framework/TestSuite.php(700): PHPUnit_Framework_TestResult->endTest(Object(PHPUnit_Framework_TestSuite), 0)
#4 /opt/versionpress/vendor/phpunit/phpunit/src/Framework/TestSuite.php(722): PHPUnit_Framework_TestSuite->run(Object(PHPUnit_Framework_TestResult))
#5 /opt/versionpress/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(517): PHPUnit_Framework_TestSuite->run(Object(PHPUnit_Framework_TestResult))
#6 /opt/versionpress/vendor/phpunit/phpunit/src/TextUI/Command.php(186): PHPUnit_TextUI_TestRunner->doRun(Object(PHPUnit_Framework_TestSuite), Array, true)
#7 /opt/versionpress/vendor/phpunit/phpunit/src/TextUI/Command.php(116): PHPUnit_TextUI_Command->run(Array, true)
#8 /opt/versionpress/vendor/phpunit/phpunit/phpunit(52): PHPUnit_TextUI_Command::main()
#9 {main}

Can I provide any more info? Thanks.

Create some indicator on succeeding tests to show whether an any previous test has failed

It can be difficult to tell at-a-glance whether the test suite has encountered a failure yet: one typically has to scroll up carefully and see if there's any "red" in the output. However, we could create some sort of indicator as to whether any of the previous tests have failed so one only has to scroll if they want to know the specifics. Furthermore, such an indicator would quickly lead the reader towards the first failure.

This author suggests such an indicator could be as simple as colouring the "success dot" (.) red if any previous test has failed.

Fatal error when PHPUnit throws notices since PIEP v2

PHP Fatal error: Uncaught Error: Call to undefined method PHPUnit_Framework_Error_Notice::getPreviousWrapped() in /scriptfusion/phpunit-immediate-exception-printer/src/Printer.php:159
Stack trace:
#0 /scriptfusion/phpunit-immediate-exception-printer/src/Printer.php(103): ScriptFUSION\PHPUnitImmediateExceptionPrinter\PhpUnit5Printer->writeException(Object(PHPUnit_Framework_Error_Notice))
#1 /scriptfusion/phpunit-immediate-exception-printer/src/PhpUnit5Printer.php(26): ScriptFUSION\PHPUnitImmediateExceptionPrinter\PhpUnit5Printer->onEndTest(Object(), 0.99986386299133)
#2 /phpunit/phpunit/src/Framework/TestResult.php(399): ScriptFUSION\PHPUnitImmediateExceptionPrinter\PhpUnit5Printer->endTest(Object(), 0.99986386299133)
#3 /phpunit/phpunit/src/Framework/TestResult.php(889): PHPUnit_Framework_TestResult->endTest(Object( in /scriptfusion/phpunit-immediate-exception-printer/src/Printer.php on line 159

Doesn't support phpunit 7 (according to composer version requirements)

Tried to install it:

 $ php composer.phar require --dev scriptfusion/phpunit-immediate-exception-printer
Using version ^2.0 for scriptfusion/phpunit-immediate-exception-printer
./composer.json has been updated
> php artisan clear-compiled
The compiled services & packages files have been removed.
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for scriptfusion/phpunit-immediate-exception-printer ^2.0 -> satisfiable by scriptfusion/phpunit-immediate-exception-printer[2.0.0].
    - scriptfusion/phpunit-immediate-exception-printer 2.0.0 requires phpunit/phpunit ^5.5|^6 -> satisfiable by phpunit/phpunit[5.5.0, 5.5.1, 5.5.2, 5.5.3, 5.5.4, 5.5.5, 5.5.6, 5.5.7, 5.5.x-dev, 5.6.0, 5.6.1, 5.6.2, 5.6.3, 5.6.4, 5.6.5, 5.6.6, 5.6.7, 5.6.8, 5.6.x-dev, 5.7.0, 5.7.1, 5.7.10, 5.7.11, 5.7.12, 5.7.13, 5.7.14, 5.7.15, 5.7.16, 5.7.17, 5.7.18, 5.7.19, 5.7.2, 5.7.20, 5.7.21, 5.7.22, 5.7.23, 5.7.24, 5.7.25, 5.7.26, 5.7.27, 5.7.3, 5.7.4, 5.7.5, 5.7.6, 5.7.7, 5.7.8, 5.7.9, 5.7.x-dev, 6.0.0, 6.0.1, 6.0.10, 6.0.11, 6.0.12, 6.0.13, 6.0.2, 6.0.3, 6.0.4, 6.0.5, 6.0.6, 6.0.7, 6.0.8, 6.0.9, 6.0.x-dev, 6.1.0, 6.1.1, 6.1.2, 6.1.3, 6.1.4, 6.1.x-dev, 6.2.0, 6.2.1, 6.2.2, 6.2.3, 6.2.4, 6.2.x-dev, 6.3.0, 6.3.1, 6.3.x-dev, 6.4.0, 6.4.1, 6.4.2, 6.4.3, 6.4.4, 6.4.x-dev, 6.5.0, 6.5.1, 6.5.2, 6.5.3, 6.5.4, 6.5.5, 6.5.6, 6.5.x-dev] but these conflict with your requirements or minimum-stability.


Installation failed, reverting ./composer.json to its original content.

This is the phpunit version I've installed:

$ php composer.phar info phpunit/phpunit | grep versions
versions : * 7.0.1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.