I don't write test for my Perl code. But I guess, that could be a good practice somehow as it gives you more confidence. I have read some tutorial and slides on this on web and that is good enough to start small testing for my code. For example, I can take a module and figure out what each sub routine should do, pass different parameters to test workability and boundary conditions etc.

I have very large code base and written years before I joined the company. I am not asked to write test of any sort, but I think that it can add the value to the existing code and very useful for future maintainer.

How in practice the need has come for you to write the tests, and how you have taken it? (Beside CPAN testing). What are the advantages/disadvantages you have seen? What significant things you have discovered in testing process ? What tool-set you have used besides Test::More ?

Thank you monks for reading so far. I would be enlightened by your inputs. For me testing is fun and will give solidarity to Perl code overall.


In reply to Testing Perl Code by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.