Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Testing for Beginners

by Ovid (Cardinal)
on Apr 08, 2004 at 13:48 UTC ( [id://343609]=note: print w/replies, xml ) Need Help??


in reply to Testing for Beginners

Even if you don't write the tests up front, you can still benefit. I once gave a testing talk to a crowd of programmers who used C#. I mentioned CSunit and one of the programmers just took off and started using it on a large app that he had built. Several days later, he mentioned to me that he had found several long-standing bugs that he never knew about (in my experience, this is common for people starting testing).

I'd start with Test::Tutorial and just start writing a few small tests for something you've worked on. That should get you the feel for it. If you're programming in another language, check out testing tools for your language. (They even have them for Javascript).

Cheers,
Ovid

New address of my CGI Course.

Replies are listed 'Best First'.
Re: Re: Testing for Beginners
by pfaut (Priest) on Apr 08, 2004 at 19:04 UTC

    I started going through Test::Tutorial and decided to write some better tests for one of my modules on CPAN. Wouldn't you know it, it exposed a bug in a section of code that I wrote but probably never had the reason to use. Guess it's time to collect all those improvements and submit a new version!

    90% of every Perl application is already written.
    dragonchild

      Heh :) I hear that all the time. My favorite was when I started writing tests for a security module and immediately found a transient bug that had been stumping me for around a year!

      Once you get into testing, check out Devel::Cover. It is probably the single most important testing tool outside of the actual tests.

      Cheers,
      Ovid

      New address of my CGI Course.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://343609]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (6)
As of 2024-04-26 09:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found