-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
"Buffered" TestDox printer(s) #3380
Comments
@rpkamp @epdenouden What do you think? |
It makes sense, although I think it would make sense if this were opt-in behaviour for the printer that could be enabled through some flag (like |
Sorry for not making this clear: yes, the buffering should be optional. The test runner can detect whether the option is required or not and enable it automatically when it is. |
@sebastianbergmann I'm all for it when it is optional. I regularly use the visibility of the changed execution order of the TestDox printer to debug the sorters, for example in #3246 :-) |
@sebastianbergmann Question: being as busy as you are, shall I pick up implementing this? I have some familiarity with this part of the codebase and I use the feature in my daily work. Nevermind if you're already working on it. |
@epdenouden That would be great -- and much appreciated. I cannot get to this before next week at the earliest. |
@epdenouden Seeing how the TestListener will be deprecated it would make more sense to implement this as an extension I think. But that would be easier once the CliTestDoxPrinter is also an extension, as you could then just decorate it, making it more generic in case other extensions need it as well. That does need some more thought on how to get the printers from TestListeners to extensions though. |
Not sure that printers should be extensions, but they should definitely use the |
Some food for thought then @rpkamp and @sebastianbergmann. I will first stomp the ordering bug #3246 and then code a proposal for this. Unless were are doing double work when |
With a few reordering issues fixed I will get on this now. |
To do
|
Do we really need a new CLI option / configuration parameter? We should be able to auto-detect that we need a buffered TestDox printer. |
We do not need it, no. It would be easy enough pick a behaviour automatically. But I thought while discussing with @rpkamp you agreed you wanted the buffering optional? So the TestDox printer would offer two modes:
I would happily not implement new configuration items because adding CLI and config options is not all that fun. |
Tomorrowevening I will start working on the |
By optional I meant "off when not needed" and "on when needed". :) |
Sorry for the mixup with the regression test yesterday. The one that ended up in #3396 actually belongs here. I've found a relatively clean way to pass the changes in execution order from the sorter to the printer. Both are instantiated in the |
@sebastianbergmann Taking more work than expected to untangle all the interrelated parts of Question: do you mind if I remove the existing buffering done by creating new Almost works! :)
WIP branch is https://github.com/epdenouden/phpunit/tree/issue-3380-buffered-testdox-printer |
If it works and makes things simpler: go for it :-) |
Well isn't refactoring fun. It works, putting all functionality back in place and doing some additional cleaning up. Done by end of the week. |
Thanks to #3092, #3147, and #3284, the order in which tests are run is no longer (always) based on "order in which DirectoryIterator finds *Test.php files" and "order of test methods within test class". This renders the TestDox result printer(s)'(s) output useless.
The TestDox result printer(s) should be changed to buffer test results in order to ensure the right order and then emit all output after the last test was run.
The text was updated successfully, but these errors were encountered: