3 ms·
TAP uses YAML as a format for supplying metadata from tests, which ... seems like a weird choice. It's not nice to read for humans, a producer still needs to qu
by mort96 3y ago
TAP uses YAML as a format for supplying metadata from tests, which ... seems like a weird choice. It's not nice to read for humans, a producer still needs to quote strings and what not. The rules are complex enough that it's not easy for producers to produce or consumers to consume, and it famously has interoperability challenges and some awkward security implications for consumers.
Honestly I would prefer if it used a custom line delimited format, why shouldn't the producer be able to produce 'message: assertion failure: foo > 0'? You could have some simple rules to escape new lines and you'd have a format which doesn't require producers to embed a complete YAML library to produce output, and it would be nicer for humans to read.
This is if you need structured metadata at all. It seems alright to me to just have free form metadata text associated with a test.
Otherwise, I kinda like the idea of a standard test output format... but in the end, 'exit code 0 == success, not 0 == failure' is enough for the vast majority of cases such as CI integration. The human can figure out the implications from the test failure based on mostly any form of textual test output format.
- hitchstory 3y agoJSON seems more like a more appropriate format for this since it's an interchange format.
- mort96 3y agoExcept it's not simply an interchange format, TAP is human-readable enough that a lot of people are going to just look at the TAP output and not bother installing a TAP consumer.
- hitchstory 3y agoJSON is also supposed to be human readable in a pinch.