The official answer: it depends.

Generally in a perfect world you write enough tests that you check out all of the functionality of a system. In this context I'm using the word "system" to refer to whatever it is you are testing.

Let me take a somewhat simple analogy: I'm buying a car from a car dealer. What am I going to test before I buy the car?

These are just a few things I can think of off the top of my head that are the "basic tests" before I buy a car. If I'm really serious about buying the car there are a lot more things I do to determine if the car is worth my money. But enough of this analogy.

In a software system I look at what the software is supposed to do and put together some tests that check out the base functionality and then I go deeper with test input data sets and try and deal with the "boundary conditions." Some of what I'm looking for are as follows:

When I'm done with my testing I hand the code off to a particular friend of mine who is notorious for finding ever inventive ways of breaking things and figure out how to "Richard Proof" my code from there.

Having done all that testing, I still remember the old saying:


Peter L. Berghold -- Unix Professional
Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg

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