-
-
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
Bring back TAP #2683
Comments
I work on Heroku CI, and I'd love to see TAP support re-introduced. Due to the fact that TAP is the only somewhat standardized test output format that can be streamed we support it for real time details about what's going on during a test run. Generally all of the JSON and JUnit formats are written after the fact, not while tests are running. |
In all the time that PHPUnit had out-of-the-box support for TAP I have never used it and, more importantly, never met somebody who used it. Futhermore, it causes problems due to its dependency on Symfony's YAML component at some point. Long story short: I will not bring back TAP. If you need a streaming logger then you should have a look at the TeamCity test listener that is used by PhpStorm, for instance. If you really need TAP then you can implement your own test listener that emits TAP and configure it in your |
Well, that's somewhat unfortunate :\ Has anyone created such a test listener? All google is really telling me is "call phpunit with --log-tap", but that's not available anymore. |
If nobody has created such a separate package then, I guess, nobody really misses the functionality enough. |
@sebastianbergmann Not sure that it's necessarily a correct assumption. Another option is a matter of prioritization. |
@sebastianbergmann PHPCI uses it https://github.com/Block8/PHPCI/blob/master/PHPCI/Plugin/PhpUnit.php#L202 And it is causing issues now: dancryer/PHPCI#1305 |
This is the top result when googling "phpunit tap" so it should include a proper solution. I'm here because Ubuntu 18.04 LTS was recently released and it upgraded to phpunit 6. If all you need is to see which tests executed, the easiest solution is to replace I also attempted to use my own test listener but there's no obvious way to override the default (ResultPrinter) output. Also, the same listener wouldn't work on phpunit 4, 5, 6 and 7 as the function definitions have changed (to namespaces and then PHP 7 type hints). I don't think there's a way to switch listeners based on phpunit version. |
Hello there, I guess there is no reason suggesting to developers to keep adding TAP adapter. sebastianbergmann/phpunit#2683 (comment)
For all those googling and finding this sad issue, here is a solution: https://github.com/gh640/phpunit-tap |
@davidolrik PHPUnit is getting a new event system, for which work is already underway by @localheinz and @theseer: a living doc of events to be implemented and the working branch. The rewrite of the loggers will provide an event stream in a way that is compatible with all filtering, grouping and reordering features. This will make it very simple to implement custom loggers like TAP. |
…hod type, see sebastianbergmann/phpunit#3706) Remove unsupported tap coverage logger (see sebastianbergmann/phpunit#2683)
It is not supported by recent phpunit versions (see [1]) and is not actually used in our testing process. So it becomes just dead code and it worth to remove it. We'll bring newer phpunit versions in further commits to test the connector against more recent PHP versions (see [2]). [1]: sebastianbergmann/phpunit#2683 [2]: https://phpunit.de/supported-versions.html
It is not supported by recent phpunit versions (see [1]) and is not actually used in our testing process. So it becomes just dead code and it worth to remove it. We'll bring newer phpunit versions in further commits to test the connector against more recent PHP versions (see [2]). [1]: sebastianbergmann/phpunit#2683 [2]: https://phpunit.de/supported-versions.html
The awesome extension by @gh640 stopped working in phpunit 10 due to the already mentioned event system. I've built an new extension from scratch for phpunit 10+: It's pretty basic as of now. Contributions are always welcome! |
It just came to my mind that YAML is a superset of JSON, so you could actually just use json_encode instead of a full-blown YAML implementation. A spec-compliant consumer should be be able to parse the JSON just fine. |
I couldn't find the reason for the removal of TAP logging, and I hadn't seen the deprecation notice for 5.7, or I would have spoken up earlier.
I'd like to argue in favor of bringing back TAP output, simply because it's the only machine-readable output that allows for streaming of progress!
The text was updated successfully, but these errors were encountered: