tokuhirom's blog

Background of Test::Pretty

Subtest function has entered the "Test :: More" was 0.94. When you no longer need the "done_testing" from 0.96. Treatment of "$?" 0.98 was cured.

Subtest of "Test :: More" is implemented in a way that extends the TAP. It is hard to see. In particular, it is a result of the subtest format that is also fed back towards the main test, this is ugly.

So, @ xaicron made ​​the "Test :: Flatten" as a countermeasure. http://blog.livedoor.jp/xaicron/archives/52299545.html

Up to this point you know the history of.

One day, when looking at the mocha is a test library of node.js, and I felt easy to see the output of mocha. I think I like this output can be even Perl.

Here, the problem is, is that we try to extend the format corresponding to the subtest machine readable / human readable as TAP. That it is human readable is that it was not fully achieved at this time. So I was thinking, and I separated format and human readable, which format is machine readable.

To "prove" commands that I need a machine readable format called TAP typically. prove command will set an environment variable called HARNESS_ACTIVE, then outputs the TAP a machine readable, is not it when I do I output a human readable.

Since the idea came to such, I tried to make a "Test :: Pretty".

"Test :: Pretty" is a brute force implementation. The output format of the test results is customizable in TB2. After the release of the TB2, you should be able to implement more smart.

Created: 2012-10-24 23:37:31 UTC
Updated: 2012-10-24 23:37:31 UTC