Test::Class::GetoptControl - Command-line control of test class execution
package MyApp; use base qw(Test::Class::GetoptControl); package main; my $app = MyApp->new; $app->runtests;
on the command-line:
$ myapp --include FooTests --shuffle # test order: shuffle ok 1 - foobar
When inheriting from this class, your application gets the ability to control the execution of test classes using command-line options.
get_classes() to determine which test classes to run and in which order, then runs them.
Asks Test::Class for information on all registered test classes, then filters and sorts them by the criteria set in the command-line options.
Defines the specific command-line options for this class; see Getopt::Inherited.
This option takes a string and can be given several times. It says that only classes whose package name contains the string should be run.
-i is an alias for this option. If no
include option is given, all test classes are run.
$ myapp --include Foo $ myapp -i Foo $ myapp --include Foo --include Bar
This options causes the test classes to be run in a random order. A note saying so is printed as well.
This options causes the test classes to be run in reverse alphabetical package name order. If neither
--shuffle are given, tests are run in alphabetical package name order. If both
--shuffle are given,
--shuffle takes precedence and a note saying so is printed.
In any case, a note specifying the sort order is printed.
See perlmodinstall for information and options on installing Perl modules.
No bugs have been reported.
Please report any bugs or feature requests through the web interface at http://rt.cpan.org/Public/Dist/Display.html?Name=Test-Class-GetoptControl.
The latest version of this module is available from the Comprehensive Perl Archive Network (CPAN). Visit http://www.perl.com/CPAN/ to find a CPAN site near you, or see http://search.cpan.org/dist/Test-Class-GetoptControl/.
The development version lives at http://github.com/hanekomu/Test-Class-GetoptControl/. Instead of sending patches, please fork this project using the standard git and github infrastructure.
Marcel Gruenauer <email@example.com>
This software is copyright (c) 2009 by Marcel Gruenauer.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.