If I've learned anything from reading Perl Medic it's the value of writing tests. This is probably old hat to the rest of you, but I just started (well 5 weeks ago) to use them, and I can't believe the impact they've had on my coding.
Previously my testing would be done by printing variables and return values of functions, relying on my eye to catch any issues. While serving me well it wasn't very good for my productivity. Since writing tests (using Test::More and Test::Exception) I've been able to write more code, with increased confidence, and better results
Now I need to create test suites for our web application using WWW::Mechanize and get the other developers on my team to buy into them. Wish me luck (although I shouldn't need it).
I'm trying to envision a WWW::Mechanize::Tester that has methods for common testing tasks, although I don't yet know what would be in it. Suggestions?
Re:Mech and tests
hide on 2004-06-12T13:39:14
I've managed to convince my co-workers the value that running tests with WWW::Mechanize will provide us, and they are all on board.One of them has taken the task of making sure all the links on a page are correct, all images are accessable, and that dynamicly generated pages match an existing HTML file.
I don't know if other people will require such tests, but this is the direction we're heading toward at this point.
Re:Mech and tests
petdance on 2004-06-13T02:13:57
Any of that code he'd like to feed back, I'll be glad to take it. I'd love to have a "check this page" bot included with the Mech distro.