[Raleigh-talk] Testing
Nathan L. Walls
nwalls at ismedia.org
Wed Feb 4 13:10:31 PST 2009
On Feb 4, 2009, at 3:57 PM, Michael Peters wrote:
> Nathan L. Walls wrote:
>
>> We've used Test::Unit, but consensus is there's too little benefit
>> for creating/running harnesses for Test::Unit vs. using prove.
>
> Yeah, Test::Unit is a dead project. The Perl world is pretty heavily
> in bed with TAP (http://en.wikipedia.org/wiki/
> Test_Anything_Protocol) which is fine by me. Instead of the harness
> running the tests directly, it's a protocol which allows the tests
> and the harness to communicate about what happened. It's a nice
> decoupling because it means you can test other things besides just
> Perl scripts, like a web API or a database (there's pgTAP for
> PostgreSQL).
>
> If you want the same basic organization of xUnit style tests, I'd
> recommend Test::Class. It gives you the same setup/teardown/,
> startup/shutdown hooks as well as letting you group related tests
> into methods. And it outputs TAP so it works with the rest of the
> Perl testing infrastructure.
Ah, good to know. It's been that long since I've even looked at
writing Test::Unit tests. We had a detour into Ruby and rspec before
returning to part of our Perl codebase. Our love for unit testing
developed during that time is just catching up with us again.
Nathan
More information about the Raleigh-talk
mailing list