3 ms·
TAP is better than some things, but it has some serious issues that I wrote about on my blog a while back - https://blog.urth.org/2017/01/21/tap-is-great-except
by autarch 4y ago
TAP is better than some things, but it has some serious issues that I wrote about on my blog a while back - https://blog.urth.org/2017/01/21/tap-is-great-except-when-its-not/ https://blog.urth.org/2017/01/21/tap-is-great-except-when-it...
Basically it's nearly impossible to fully parse it correctly.
- hedora 4y agoIs test2 a flag for TAP? If you have to pick one or the other, then you're breaking the common flow (human debugging code before pushing) so that management can have better reports. The right solution would be to add a environment variable or CLI parameter that told tap to produce machine readable output, preferably with a separate tool that could convert the machine readable junk to whatever TAP currently writes to stdout/stderr.
- autarch 4y agoTest2 is a Perl distribution that replaces a bunch of older test stuff. See https://metacpan.org/pod/Test2 https://metacpan.org/pod/Test2 But unlike TAP, it's fairly Perl-specific as opposed to just being an output format. I imagine you could adapt the ideas in it to Node but it'd be more complex than simply implement TAP in JS. And yes, I think the idea of having different output formats makes sense. With Test2, the test _harness_ produces TAP from the underlying machine-readable format, rather than having the test code itself directly product TAP. The harness is a separate program that executes the tests.
- sitkack 4y agoWhat is this madness? Nothing should have to be parsed. Write test results to sqlite, done. You can generate reports directly off those test databases using anything of your choice. your-program test-re.sqlite output.html
- hedora 4y agoYeah, but sqlite doesn't scale, and SQL isn't a functional language: https://web.archive.org/web/20110114031716/https://browsertoolkit.com/fault-tolerance.png https://web.archive.org/web/20110114031716/https://browserto...