phpunit-speedtrap
phpunit-speedtrap copied to clipboard
Does not work when running phpunit via paratest
When running my testsuite with paratest ./vendor/bin/paratest
the speed trap results are not printed to the console. It works great when running via ./vendor/bin/phpunit
Thoughts on how to resolve this?
see https://github.com/paratestphp/paratest/issues/286
As speedtrap echos the output, it gets lost once the paratest process stops.
Would there be a way for the extension to keep their state, and output it at the end of the test run (e.g. on endTestSuite
)?
@rvanlaak Hmm, I have not personally used paratest to know its infrastructure, or how SpeedTrapListener output could be rerouted to paratest output. Any ideas here?
I see the code sample in paratestphp/paratest#286. Does paratest support collecting logs from a defined location?
Would it be valuable if SpeedTrapListener config supported redirecting report output to another location? I'm open to ideas and PRs on how this could work. For example, issue https://github.com/johnkary/phpunit-speedtrap/issues/15 requests improved output when PHPUnit testdox output is used. Customizable output handling could benefit some users.
Yes, it would definitely be helpful if the speedtrap wrapper would be able to send the output elsewhere. Especially when it would be configurable to keep the output in-memory (so paratest can collect it later).
Spreading tests over multiple processes means the output gets lots, as the echoing speedtrap does in the pre-test stage and post-test stage can not get caught.