-
-
Notifications
You must be signed in to change notification settings - Fork 169
POC: Stream TestRunner output instead of custom progress bar #2257
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
base: master
Are you sure you want to change the base?
Conversation
I think streaming the TestRunners output instead of building our tool agnostic on top has the following benefits
|
if ($skipProgressBar) { | ||
$testFrameworkExtraOptions .= ' --no-progress'; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
at best each test-adapter would set the necessary options on his own - no all test-runners have a option named --no-progress
if (Process::OUT === $type) { | ||
$this->output->write($data); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here we stream the output of the test-runner to the end-user instead of the progress bar we had before (which did not reflect correct test-count etc)
8000
I've tested it locally, and I think it makes the output much much worse, unfortunately.
What we need from the underlying test framework (again - my opinion) is
so only 2 visible short strings would be really needed, like
Much less output than in p.1, but still 30-35 lines for Infection itself:
This information is not needed and is very noisy.
I wouldn't say it's huge and ugly. We built it based on users' feedback, and it really helps users to think about underlying potential issues, because Infection always run tests in a random order, while project could run them sequentially - this is a very important information. I think if this error message is not useful and ugly, this is a good candidate for a separate issue. My personal conclusion is: I would better parse PHPUnit's output to get that minimal and nice
rather than displaying all the PHPUnits output for a user. |
It feels like "Ran 321 tests" adds on maintenance burden for reasons that I'm struggling to see. How's this number is essential for the users? How's it going to make the user's experience far worse if we don't show it? (I use Infection with |
let me re-phrase what the actual problem is what I am trying to solve here. we discussed at several places about so with this PR, my take is:
=> the idea: with this PR infection gets a real replacement for the usual project test-runner. I try to simplify how people use infection. it is no longer an additional step the user needs todo after running the regular test-suite. |
So what you are saying folks are using |
yes. I think if infection users could do that, that would ease integration of infection into their projects and simplify the setup -> reduce hurdles. it would simplify ci configs etc. the PR is just a POC. and a stable solution to achieve that might be more involved. I guess the main problem is how fast can we run the test-suite (the feedback loop for the enduser with the test-runner) so when infection would replace the call to vendor/bin/phpunit, this can only work if we can be similar fast in reporting test errors back to the user (this might for example mean we need to run the test runner twice behind the scenes, in case coverage collection has a too big impact). Btw: I am in contact with a php-src dev who will look into making pcov faster |
give the user some indication where infection output starts and where test-runner output was embedded
refs #2254
just so we can play with it and see how the DX is