I have started using AUTOMATED_TESTING and RELEASE_TESTING variables.

AUTOMATED_TESTING is set any time I have an automated process doing my build -- places where prompting or other environmental considerations cannot be assumed.

RELEASE_TESTING cranks up my testing level to include kwalitee (pod, tidy, standards checks, etc) tests. These get run prior to a release (well, as part of the release), before the code is shipped off (on passage of all tests) to the distribution system. These are also turned on periodically when doing development to ensure that I have not broken anything.

I also make certain tests optional (using require and skip/skip_all based on if the current environment has a specific module installed (my development environment may have more modules installed for development and testing purposes that are not or should not be in production, for example).

Anything that I can automate is a good thing :-)

If you are targeting cross platform, you need to ensure that your tests are also cross platform. In the case where a test fails on Windows due to path differences, I would argue that your test is wrong. You can build your path names in a portable way in your tests just as well as you can in your modules.

Take this all with a grain of salt, as my exposure to testing is not formal, but based on lots of reading, asking questions, and "fixing" complaints I have with the behaviors of tests I have had the pleasure (take that as you will) of using.

--MidLifeXis


In reply to Re: How To Test by MidLifeXis
in thread How To Test by John M. Dlugosz

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.