I'm contemplating the general problem of how best to classify and organize tests.
As a specific example, you might classify and organize your tests like this:
An obvious limitation of such a scheme is that a test cannot simultaneously be in two different categories. For example, where should I place an rtbug test that is also a stress test? And a "stress" test may or may not be "long running" - what if I want to run all stress tests, but not the "long running" ones? Arguably, the short running stress tests should be in t/
and not xt/
, so that they are run by "make test". Property-like metadata solves this problem, akin to adding "tags" to your photo collection. Tools like prove
could be enhanced to allow you to specify boolean combinations of test metadata that you want to run.
Maybe what I'm proposing is YAGNI
. It seems I'll need to come up with some specific, compelling use cases before I could hope to gain any support for this idea.
Update: Note that the xt/ directory layout recommended by Module::Install::ExtraTests is:
xt/author - run when the tests are being run in an author's working c
xt/smoke - run when the dist is being smoked (AUTOMATED_TESTING=1)
xt/release - run during "make disttest"
Are you posting in the right place? Check out Where do I post X? to know for sure.
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
Want more info? How to link
or How to display code and escape characters
are good places to start.