I use HTTP::WebTest for that sort of regression testing, just to make sure
nothing breaks along the way. I also use LWP and HTML::LinkExtor to check
some dynamically generated pages to make sure it's still generating valid
links. (It broke once, so after fixing I added a test for it... )

For debug messages I generally just use warn statements temporarily, then
remove them when done. I've toyed with Log::Log4perl a little bit, and will
probably use that if I ever decide it's worth the setup time. I think it's
based on a Java logging tool called Log4J or Log4Java or the like.

Wes



Andrew Wyllie <[EMAIL PROTECTED]> on 01/09/2003 04:22:43 PM

Please respond to [EMAIL PROTECTED]

To:    Jim Martinez <[EMAIL PROTECTED]>
cc:    mod_perl list <[EMAIL PROTECTED]>
Subject:    Re: development techniques


On Thu, 09 Jan 2003, Jim Martinez wrote:
(snip)

> Will the use of lwp instead of a browser improve my coding ability
(either
> in terms of speed or just improving my perl coding)?  Seems like I'd have
> to spend too much time with the lwp script (tell it to first request the
> page then choose option A and B then hit the "submit" button ... )


I think the advantage of using LWP for testing is that you could write a
large series of tests which could be run frequently.  So, if you make some
little change way down in the guts of your code, you can then run all your
tests to make sure everything is still working without having to worry
about missing something along the way.  So, it may seem like a lot of
work up front, but in the long run you are better off.

There is other stuff out there that you can use for testing.  Test::Unit
come to mind, and there is a test framework I read about called puffin
(http://www.puffinhome.org/) which sounds like it could be useful.


andrew








Reply via email to