Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add output buffering spinner to colored testdox printer #3497

Merged
merged 1 commit into from Jan 22, 2019
Merged

Add output buffering spinner to colored testdox printer #3497

merged 1 commit into from Jan 22, 2019

Conversation

epdenouden
Copy link
Contributor

@epdenouden epdenouden commented Jan 22, 2019

The TestDox printer will buffer test result output when the execution has been changed by --order-by. When this happens the prettified printer will let the user know by showing a little spinner:

image

Quick way to see it at work, run: phpunit --testdox --order-by=random --testsuite end-to-end

To prevent visual noise the spinner will only appear when out of sequence results are detected by the colorized printer and hidden when it has caught up. No further configuration or changes needed.

That's it. :)

@codecov
Copy link

codecov bot commented Jan 22, 2019

Codecov Report

Merging #3497 into master will decrease coverage by 0.02%.
The diff coverage is 71.42%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #3497      +/-   ##
============================================
- Coverage      82.8%   82.77%   -0.03%     
- Complexity     3670     3680      +10     
============================================
  Files           144      144              
  Lines          9577     9598      +21     
============================================
+ Hits           7930     7945      +15     
- Misses         1647     1653       +6
Impacted Files Coverage Δ Complexity Δ
src/Util/TestDox/CliTestDoxPrinter.php 93.65% <50%> (-2.96%) 57 <4> (+4)
src/Util/TestDox/TestDoxPrinter.php 78.44% <84.61%> (+0.77%) 55 <6> (+6) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c697384...fd2efa4. Read the comment docs.

@sebastianbergmann sebastianbergmann merged commit 785717c into sebastianbergmann:master Jan 22, 2019
@epdenouden epdenouden deleted the testdox-spinner branch January 23, 2019 10:14
@hopeseekr
Copy link

I really dislike this spinner and testdox is my main mode.

@epdenouden
Copy link
Contributor Author

epdenouden commented Nov 5, 2019

I really dislike this spinner and testdox is my main mode.

Hi there @hopeseekr! You are not the only one, that's why an option to switch it off was added.

Try this:

./phpunit --testdox --no-interaction --order-by=reverse

and you will see nothing but the version header until test output can be flushed in the original order.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants