Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Shlomi Fish (918)

Shlomi Fish
  shlomif@iglu.org.il
http://www.shlomifish.org/
AOL IM: ShlomiFish (Add Buddy, Send Message)
Yahoo! ID: shlomif2 (Add User, Send Message)
Jabber: ShlomiFish@jabber.org

I'm a hacker of Perl, C, Shell, and occasionally other languages. Perl is my favourite language by far. I'm a member of the Israeli Perl Mongers, and contribute to and advocate open-source technologies. Technorati Profile [technorati.com]

Journal of Shlomi Fish (918)

Saturday November 05, 2005
05:28 PM

Test::Shlomif::Harness - Giving Test::Harness a Face Lift

[ #27467 ]

It all started when I attended a presentation about TestOOB in the first new Israeli Pythoneers meeting. One thing that was mentioned there was that it enabled colouring the output of the tests.

Then I decided I wanted the same, only for the final line of the tests in the "make test" or "./Build test" output. So I looked at Test::Harness, but then saw that the line printing the OK was buried deep inside the conditional of a certain function, without an ability to easily override it. Not to mention that the entire module was not object oriented, so over-riding functions there was kind of a black magic.

I posted a message to perl-qa asking if someone knew of a good way to do it. Then I noted that I'd like to spin Test::Harness off and create a better module while possibly breaking the semantics a lot of the internals. The reply of Andy Lester (the Test::Harness maintainer) was "Show me the Code".

It took me some time, but I finally came to it. I renamed Test::Harness into Test::Shlomif::Harness and started heavily refactoring and revamping it: converting it to an object, extracting methods, converting hashes into objects, moving function parameters to instance variables, and generally giving it some loove. My first

I announced my first release to perl-qa as well. Michael Schwern wrote a message with some errata, which I incorporated. Andy also had something to say, and this started an active discussion.

Since then I did more refactorings and stuff. Today, I released version 0.0100_04 onto a non-suspecting world. (especially for this announcement). The code is maintained in a Subversion repository as part of the web-cpan project on Berlios, so the most up-to-date version is available there.

Test::Shlomif::Harness is only a temporary name, but I hope to release it into CPAN soon. Ironically, I did not yet implement a derived class that does the colour highlighting of the output.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.