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

Unbuffered TestDox printer option #3567

Closed
5 tasks done
epdenouden opened this issue Mar 18, 2019 · 10 comments
Closed
5 tasks done

Unbuffered TestDox printer option #3567

epdenouden opened this issue Mar 18, 2019 · 10 comments
Assignees
Labels
feature/testdox The TextDox printer/formatter type/enhancement A new idea that should be implemented

Comments

@epdenouden
Copy link
Contributor

epdenouden commented Mar 18, 2019

As a developer of slower integration tests
I want to see prettified tests results as soon as tests are completed
so that my workflow is both agile and æsthetic

Background

The buffering testdox printer and its friend the spinner are breaking some workflows that people used to good effect.

The example from #3560 is using Testdox to get readable results while running. The actual test order is not that important, set by configuration or implied by test collection structure. My implementation of the buffering printer breaks this specific use case.

Solution

Implement explicit "do not buffer result ouput" option, along the lines of #3513:

  • extend buffering mechanism to explicitly support always-flush
  • add CLI flag
  • add end-to-end tests voor --enable-buffer and --disable-buffer flag
  • add XML-configuration option
  • add unit test coverage for unbuffered Testdox
@epdenouden epdenouden added the type/enhancement A new idea that should be implemented label Mar 18, 2019
@epdenouden epdenouden self-assigned this Mar 18, 2019
@epdenouden epdenouden added this to the PHPUnit 8.1 milestone Mar 19, 2019
@rpkamp
Copy link
Contributor

rpkamp commented Mar 26, 2019

This would be a lot simpler if the buffering were done in a decorator.

By default you apply the decorator when the tests are shuffled, unless the CLI/config indicates it shouldn't.

This has the added benefit that the decorator could decorate any result printer, not just the TestDox printer. This may not be interesting for PHPUnit itself, but it might be for third party printers.

I wouldn't mind taking a stab at this if you'd like.

@sebastianbergmann sebastianbergmann added the feature/testdox The TextDox printer/formatter label Apr 22, 2019
@sebastianbergmann sebastianbergmann removed this from the PHPUnit 8.3 milestone Aug 1, 2019
@BafS
Copy link

BafS commented Feb 25, 2020

Any new about this issue @epdenouden ?

@epdenouden
Copy link
Contributor Author

Yes, this issue is on hold until the new event system is ready.

Back then I did some experiments and it ended up about as hacky as the TestDox internals.

@epdenouden epdenouden added the status/blocked Blocked by a dependency, or similar label Feb 25, 2020
@N4M3Z
Copy link

N4M3Z commented Mar 25, 2020

I see the issue is still marked as blocked, are there any news about the new event system?

@epdenouden
Copy link
Contributor Author

@m4rw3r The event system is still under development. @localheinz and @theseer are working on the central parts. As soon as those are (pre-release) stable I can migrate the logging and execution reordering.

@epdenouden
Copy link
Contributor Author

Also, this is under active development again as I want more logging options while working on #4302 and adjacent refactorings.

@epdenouden epdenouden removed the status/blocked Blocked by a dependency, or similar label Jun 30, 2020
@epdenouden epdenouden mentioned this issue Jun 30, 2020
7 tasks
@epdenouden epdenouden linked a pull request Jul 1, 2020 that will close this issue
7 tasks
@epdenouden
Copy link
Contributor Author

image

@BafS
Copy link

BafS commented Sep 25, 2022

@sebastianbergmann this PR didn't get merged #4346, this issue is still valid.

@sebastianbergmann
Copy link
Owner

The existing TestDox implementation in PHPUnit 8.5 and PHPUnit 9.5 will not be changed. PHPUnit 10 will have an implementation of TestDox that does not have this problem.

@BafS
Copy link

BafS commented Sep 26, 2022

Okay thanks for the feedback!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature/testdox The TextDox printer/formatter type/enhancement A new idea that should be implemented
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants