Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Comment on

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

Yes, I know the purpose of AUTOMATED_TESTING, so my post was not as clear as it should have been. Let me clarify the point I'm trying to make with a specific example. Suppose, as a CPAN author, I've written a long-running stress test, t/stress.t say, for my distribution. With AUTOMATED_TESTING, the test writer is expected to write some (imperative) code in t/stress.t to check for the AUTOMATED_TESTING (and possibly other) environment variable/s and skip the test if this variable is not set.

Instead of asking the test to check its runtime environment, I'm proposing that the test tool/s check the test metadata. In this example, the t/stress.t test (declaratively) states, via test metadata, that it is a long-running stress test. Armed with this metadata, the CPAN tool chain can hopefully "do the right thing": "make test" run by a human would skip the test, while automated smoke testers would cheerfully run it.

While the details are yet to be fleshed out, I find this approach attractive for three reasons:

  • Easier for test writers. Declarative trumps imperative. For example, the stress test writer does not need to write any code to check for any environment variable/s; instead he/she simply states (declaratively) that this is a long-running stress test.
  • Environment variables are a generally unattractive mechanism (at least to me) because they are an OS-level (potentially insecure) global variable that may not be available in all environments that Perl may want to run in.
  • Using metadata offers interesting extension possibilities in that being a long-running, stress test is just one of many possible test attributes. We may uncover many other useful test attributes if we think about it and once we have a mechanism to describe test metadata.

Update: If you squint, you'll see that the xt/ sub-directory (for "extra" tests) is just a special case of my more general proposal; that is, placing a test in the xt/ sub-directory states (declaratively) that this test has metadata of being an "extra test" (where I guess "extra test" here means "do not run via 'make test' action").


In reply to Re^2: Perl CPAN test metadata by eyepopslikeamosquito
in thread Perl CPAN test metadata by eyepopslikeamosquito

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
  • 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.
  • 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 making s'mores by the fire in the courtyard of the Monastery: (7)
    As of 2015-07-08 07:09 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









      Results (96 votes), past polls