scriptfusion / phpunit-immediate-exception-printer Goto Github PK
View Code? Open in Web Editor NEW:fax: Immediately prints exception and assertion failures during testing.
License: GNU Lesser General Public License v3.0
:fax: Immediately prints exception and assertion failures during testing.
License: GNU Lesser General Public License v3.0
The output is pretty long and easily overlooked. An option to only output failed tests or tests that take a long time would be a good asset.
๐ข
After running the tests, a summary of tests that ran longer than a given amount of time would be nice.
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?
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.
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.
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
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.