One of the agilistas said it very well on the XP mailing list once.

It's based on the fact that you really start to appreciate the test suite once it has saved you from breaking the application a couple of times.

Like when the tests told you that while you tinkered in this part of the code base a totally unrelated and completely separate feature stopped working. Only it wasn't so unrelated after all. And if not for the test no one would have realized there was a new bug in the system until days or weeks later when someone (I bet an end user too) reports that something isn't right.

So after writing tests over a period of time you realize the test suite is your safety net that will catch you when (not if) you fall. This is doubly true when someone is new to a code base, so by writing tests you ensure that neither you nor other people screw up the code.

Anyway, what the guy said on the mailing list was something like this:

You continue writing tests until boredom overcomes fear.

And I think that's very true.

/J


In reply to Re: when do you stop writing test? by jplindstrom
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.