Boy Howdy, I'd love to be in the position in my project of, "when do I stop making tests" :)

I'm currently on a project that starts its (about) 7th year, only having a test suite since last September.

The test suite barely covers any of the functionality, but the parts that it has, have become invaluable.

Since it's sort of a weird position to be in, from here on out, I'm doing this:

* Write a new (failing) test for any and all bugs submitted. Work on making the tests pass. Keep these tests for as long as they're applicable. Note the bug in the test script itself

* Any new code, write tests that cover as much as possible. Tests for new code is easier, since you can write the tests at the same time as you write the code - you *think* a bit more clearer when writing the code since you sort of wonder a bit how this could be tested

* All other code, write tests when time allows. Untested code is a big question mark in the sentence of, "Is this *really* working the way I think it is?"

Some good times to write tests are when people submit patches that don't change any API but give some sort of performance improvement - does the patch do this without breaking functionality?

Another good time is if you're writing new documentation. Write a test to verify that your documentation is correct.

Hope that gives some insight ;)

 

-justin simoni
skazat me

<script language="JavaScript" src="http://quotes.prolix.nu/cgi-bin/random_quote_js.pl"> </script>


In reply to Re: when do you stop writing test? by skazat
in thread when do you stop writing test? by Qiang

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.