Test::Harness 3.00 has finally been released, and it's a huge opportunity for anyone who writes tests with Perl, if only for the ability to run prove -j and run tests in parallel. I took a few minutes as the maintainer of the old 2.xx series to interview Andy Armstrong, the new maintainer of 3.x, about the history of the new Test::Harness, and what it took to get here.

Andy Lester: So, Andy Armstrong, a joyous day has come: Test::Harness 3.00 has been released.

Andy Armstrong: Yes. I was relieved.

Andy Lester: What has it taken to get to this point?

Andy Armstrong: I think we had a fair bit of paranoia about breaking the toolchain for everyone, and thus becoming extraordinarily unpopular. That made us cautious. We spent a lot of time building our own smoke testing setup. And running lots of people's tests against our code.

Andy Lester: Who is the "we" in this? Back in June of 2006, Schwern and I started the kick off to Test::Harness 3.00 at YAPC::NA in Chicago. What's happened since then?

Andy Armstrong: Ovid got the code started and had just about everything in place by April 2007. Around then I volunteered to look at a Windows problem. And I sort of got dragged in. I really liked the code Ovid had written and enjoyed working on it - so that was an attraction. The Windows problem took a few minutes - but I'm still here.

Andy Lester: You've done a lot more than being dragged in. You hosted the Subversion repository, and the mailing list. What else?

Andy Armstrong: My monopolist plan laid bare for all to see... I have a server which is nominally so I can do things like that - so then I have to do them to justify its existence. So I'm hosting the perl-qa wiki, the TAP wiki. Just sites that needed a home. Like an orphanage :)

Andy Lester: You've uploaded T::H 3. Are you now the maintainer? I thought Ovid was going to be the maintainer of T::H3. (I ask both for the benefit of the Perlbuzz readers, and for my own knowledge:-))

Andy Armstrong: I think I made a move on Ovid somewhere back there and he didn't struggle. So now I'm it. I honestly can't remember how that happened.

Andy Lester: Glad to have two Andys maintaining different versions of the same module. :-) So why does someone want to upgrade to Test::Harness 3? What's in it for the average Perl user?

Andy Armstrong: If you do nothing else - just install it - you'll get better looking test reports. Color even :) And when people start writing test suites that use TAP version 13 features you'll get even more informative reports as an indirect result of T::H 3.00.

Andy Lester: And it's completely compatible?

Andy Armstrong: It's very slightly more fussy about completely crazy syntax errors. But generally yes, compatible - foibles and all. That's syntax errors in TAP (Test Anything Protocol) - just for folk who don't know what's going on behind the scenes.

Andy Lester: So what's in the future for Test::Harness and prove, its command-line interface?

Andy Armstrong: Well we're just talking about TSP (Test Steering Protocol) on the perl-qa list. And we need to do something interesting with the YAML diagnostic syntax we have now. I've written a module for TextMate that uses that so that the cursor jumps to the right line in the test program when you click on the diagnostic.

Andy Lester: What's the benefit of TSP? How would a tester use that?

It would give a test suite more active control over its own execution. Particularly in the case of things like user interface toolkits or modules that are highly platform or configuration dependent you may have large number of tests you'd like to skip conditionally. So TSP would be a convenient way to have a single controller program that would decide which other parts of the test suite to execute. And then you'd probably grow on that to expose more control over which tests to run via prove or whatever UI you'd be using.

Andy Lester: So a more advanced version of SKIP blocks, and you wouldn't have to figure out what tests to run when you ran Makefile.PL or Build.PL.

Andy Armstrong: Yes. And an area where people are likely to find new applications too.

Andy Lester: Anything else people should know?

Andy Armstrong: That there's still plenty more to do with T::H and testing in general. And that I'm surprisingly cheap :) I also want to thank people who have worked on Test::Harness 3, in alphabetical order: Sebastien Aperghis-Tramoni, Shlomi Fish, David Golden, Jim Keenan, Andy Lester, Michael Peters, Curtis "Ovid" Poe, Michael Schwern, Gabor Szabo and Eric Wilhelm. All helped immensely - even you :)

Andy Lester: Well, I do want to thank all of you for doing this massive overhaul of Test::Harness. Abandoning the existing code and starting from scratch has given T::H a new lease on life, and a new platform to move forward.