|
NAMETest::Kwalitee - Test the Kwalitee of a distribution before you release itVERSIONversion 1.28SYNOPSISIn a separate test file:use Test::More; use strict; use warnings; BEGIN { plan skip_all => 'these tests are for release candidate testing' unless $ENV{RELEASE_TESTING}; } use Test::Kwalitee 'kwalitee_ok'; kwalitee_ok(); done_testing; DESCRIPTIONKwalitee is an automatically-measurable gauge of how good your software is. That's very different from quality, which a computer really can't measure in a general sense. (If you can, you've solved a hard problem in computer science.)In the world of the CPAN, the CPANTS project (CPAN Testing Service; also a funny acronym on its own) measures Kwalitee with several metrics. If you plan to release a distribution to the CPAN -- or even within your own organization -- testing its Kwalitee before creating a release can help you improve your quality as well. "Test::Kwalitee" and a short test file will do this for you automatically. USAGECreate a test file as shown in the synopsis. Run it. It will run all of the potential Kwalitee tests on the current distribution, if possible. If any fail, it will report those as regular diagnostics.If you ship this test, it will not run for anyone else, because of the "RELEASE_TESTING" guard. (You can omit this guard if you move the test to xt/release/, which is not run automatically by other users.) FUNCTIONSkwalitee_okWith no arguments, runs all standard metrics.To run only a handful of tests, pass their name(s) to the "kwalitee_ok" function: kwalitee_ok(qw( use_strict has_tests )); To disable a test, pass its name with a leading minus ("-"): kwalitee_ok(qw( -use_strict has_readme )); BACK-COMPATIBILITY MODEPrevious versions of this module ran tests directly via the "import" sub, like so:use Test::Kwalitee; # and that's it! ...but this is problematic if you need to perform some setup first, as you would need to do that in a "BEGIN" block, or manually call "import". This is messy! However, this calling path is still available, e.g.: use Test::Kwalitee tests => [ qw( use_strict has_tests ) ]; METRICSThe list of each available metric currently available on your system can be obtained with the "kwalitee-metrics" command (with descriptions, if you pass "--verbose" or "-v", but as of Module::CPANTS::Analyse 0.97_03, the tests include:
ACKNOWLEDGEMENTSWith thanks to CPANTS and Thomas Klausner, as well as test tester Chris Dolan.SEE ALSO
SUPPORTBugs may be submitted through the RT bug tracker <https://rt.cpan.org/Public/Dist/Display.html?Name=Test-Kwalitee> (or bug-Test-Kwalitee@rt.cpan.org <mailto:bug-Test-Kwalitee@rt.cpan.org>).There is also a mailing list available for users of this distribution, at <http://lists.perl.org/list/perl-qa.html>. There is also an irc channel available for users of this distribution, at "#perl" on "irc.perl.org" <irc://irc.perl.org/#perl-qa>. AUTHORS
CONTRIBUTORS
COPYRIGHT AND LICENSEThis software is copyright (c) 2005 by chromatic.This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
Visit the GSP FreeBSD Man Page Interface. |