Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

hide (4398)

  (email not shown publicly)

hide has been programming in Perl since 1998. Much of this time has been focused on system automation and data warehousing.


Journal of hide (4398)

Sunday June 06, 2004
12:50 PM

The joy of Test

[ #19113 ]
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).

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • Mechanize and testing! Two of my favorite topics!

    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?



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

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


  • Brian Ingerson's Test::FIT [] module has been my "most useful module" recently. The ability to provide a browser-based summary of test results has got my managers yelling for more. I've set up a cronjob which runs a large suite of tests of the company's website continuously (using WWW::Mech []) and the managers get a page of green squares if all is well or red or yellow squares if something breaks. They love it and thus keep paying me to add more tests. (Lots of pretty colours.) Quite coincidentally (:^) the te