Tyler MacDonald <[EMAIL PROTECTED]> wrote:

> Adam,
>       I have one more edgey case I'd like to see on this list:
....
>       Tests run, but >50% (or maybe >80%?) are skipped.
>
>       From what I've seen, the most common cause of this is that the
> package is untestable with the current build configuration. Eg; you needed
> to specify a webserver or database or something to get these tests to run.

This scenario (many skipped tests) can also happen with modules that
come bundled with many drivers.  One driver might be required, but the
rest might be optional.  Tests for optional drivers that are missing
their prerequisites will be skipped.

I have several modules[1] like this, and for each of them, I wrote the
test suite so that each test script re-runs all of its tests with every
available driver.

In the case of C::A::P::AnyTemplate, five templating systems are
supported, but only HTML::Template is required[2].

So if the user has no other supported templating modules besides
HTML::Template installed (i.e. the minimum supported configuration),
then 243 out of 326 tests will be skipped, i.e. 75%.  If, at some point
in the future, I add support for another templating system, then the
number of tests skipped by default will increase.

I'm not really sure if this is the best way to manage my optional tests
(one disavantage is that users tend to get freaked out by so many
skipped tests).  I'm just pointing out a couple of modules where a lot
of skips are the norm.



Michael


[1] http://search.cpan.org/dist/Config-Context/
    http://search.cpan.org/dist/CGI-Application-Plugin-Config-Context/
    http://search.cpan.org/dist/CGI-Application-Plugin-AnyTemplate/

[2] HTML::Template is required because it's already a prerequisite of
    CGI::Application

--
Michael Graham <[EMAIL PROTECTED]>

Reply via email to