Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??

I've read a lot on this and other sites about testing, but I seem to be missing something fundamental between "it's a good idea" and "here's how to go about it in a real project." I've watched screencasts and presentations, I've read articles and module instructions, and the examples are always abstracted so far from my use case that I don't understand how to get from here to there.

I have a number of projects where I'm interested in automatic testing, but I'll focus on one for this posting. The code base is a set of monitoring and maintenance routines for a Windows server product. It's about 9,000 lines of code that does a lot of direct SQL work, Windows event viewer work, Windows services work, and file system work... then it records statistics in RRD files and generates some HTML and email reports. This is a free tool which is nominally open source, although I am the sole developer. The target environments run the tool as a compiled .exe, so they won't be running the test harness at all (e.g. as done during CPAN install).

In a perfect world, it would have little to say. Some of its test conditions only occur rarely, and others that I intend to add are "once-in-a-blue-moon" situations... but indicative of the kind of extreme problem that needs to be jumped on right now.

So, my question: is the idea in testing this sort of real-world application to fabricate a complete set of environmental inputs and then test the program's reactions to them? Or is there a higher level of abstraction that I'm missing? Given the number of interfaces being discussed, I've got some workload concerns with building and resetting a test case for every possible situation. How do other Perl developers do this?


In reply to how to begin with testing? by stinkingpig

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!
  • 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, 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, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            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.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others musing on the Monastery: (11)
    As of 2014-08-22 12:05 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      The best computer themed movie is:











      Results (156 votes), past polls