logo       

Re: Test::Harness wrangling: msg#00055

Subject: Re: Test::Harness wrangling
On Thursday 29 June 2006 07:13, Andy Lester wrote:
> Tomorrow, Adam Kennedy and I (and Schwern?) will be banging on
> Test::Harness.
>
> Any bugs that we especially need to work on?
>

Well, giving my angle as the Test::Run maintainer (which is a fork of 
Test::Harness):

1. I may have eliminated some bugs in Test::Run without reporting them in 
Test::Harness yet. (not maliciously - it was an accident).

2. Some of my refactorings caused some bugs by accident (which was visible in 
the output) which were not caught by the test suite. As a result, I added 
some tests to Test::Run, but did not send a patch with them to Test::Harness. 

Hoping that I'm not defaming Andy or something, he told me that he isn't 
interested in such tests at this point, because the output is still 
dynamically changing. I think that instead the tests should still be there, 
and would need to be modified (preferably before the behaviour is modified). 

Otherwise, a wrong refactoring can easily break something. (As was the case 
for me).

3. I separated Test::Harness into Test::Run and Test::Run::CmdLine. Test::Run 
is the backend with a (hopefully) sane programmable API (with no global 
variables, environment variables, command line processing, etc.). 
Test::Run::CmdLine handles all the command line stuff. Both can be inherited 
or over-rided with plugins (or possibly traits/roles which I did not play 
with yet, but think I understand). 

Normally a T::R::CL plugin also registers an appropriate T::R plugin. The 
default behaviour for Test::Run currently is to behave much like 
Test::Harness. However, that may change as I may wish to move some of the 
functionality to plugins, so one can more easily customise it.

4. I implemented the prove command as a class, with a small command line 
wrapper: 

http://xrl.us/nsub (Link to search.cpan.org)

5. One important note: Test::Run is not backwards-compatible with 
Test::Harness. The documented external API (and the internals even more so) 
were broken. I once contemplated writing a Test::Harness-like wrapper for 
Test::Run but I did not get to it yet.

In any case, I've been actively using the Test::Run::CmdLine "runprove" 
utility to run some of my own test files. See:

http://flickr.com/photos/81969889@N00/68430623/

I also would like to integrate it with the makefile/Buildfile generated by 
Module::Build and ExtUtils::MakeMaker (at least using some wrappers inside 
the Build.PL or Makefile.PL scripts, which I have yet to figure out how to 
write.)

------------------------

All these are just notes for what I did with Test::Run - you can take them or 
leave them. I don't mind you hacking on Test::Harness (it could use some 
work), but naturally would also love to receive any patches to Test::Run, 
which also still has some issues (like the fact most of the Test::Harness POD 
documentation was not forward-ported). The code can be checked out using svn:

http://svn.berlios.de/svnroot/repos/web-cpan/Test-Harness-NG/trunk/

(or alternatively with https)

If you register at Berlios.de and send me a patch, I'll add you as a commiter 
so you can commit it. (Following Audrey Tang's on IRC lead).

Regards,

        Shlomi Fish

---------------------------------------------------------------------
Shlomi Fish      shlomif@xxxxxxxxxxx
Homepage:        http://www.shlomifish.org/

95% of the programmers consider 95% of the code they did not write, in the
bottom 5%.



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
linux.arklinux....    user-groups.lin...    kde.usability/2...    ietf.ipp/2002-0...    mail.spam.spamc...    os.netbsd.devel...    audio.cd-record...    text.unicode.de...    php.documentati...    games.fps.halfl...    window-managers...    suse.oracle.gen...    bug-tracking.gn...    video.dvdrip.us...    xfree86.cvs/200...    java.netbeans.m...    network.argus/2...    culture.sf.kill...    debian.ports.al...    freebsd.questio...    qplus.devel/200...    handhelds.palm....   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe