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%.
|