After many years of writing Perl I am finally starting to write tests for the modules that I've written, and this is presenting me with a bit of a challenge.

My first test file starts with .. shall we say .. a base object, from which all other objects flow. My plan is to be able to run this test right after an install to check that some bare bones functionality is present, and again after I've primed the system with a few test files.

Thus, the second test run will be more comprehensive. I believe I know how to do that, using Schwern's excellent Test::More and the SKIP: feature, but I'm concerned that I'm going to end up with a larger and larger test file. Should I, or can I, break out the other tests into separate files in an attempt to modularize? Or is there a cunning way to run groups of tests from a superior file?

I welcome your feedback.

Alex / talexb / Toronto

"Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds


In reply to How to structure tests that span several modules by talexb

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.