Test::Nightly::Test - Make and runs your tests.
Designed to run our tests, and then store the results back into the object. You probably should not be dealing with this module directly.
use Test::Nightly::Test; my $test = Test::Nightly::Test->new(); $test->run();
The following methods are available:
my $test = Test::Nightly::Test->new({ modules => \@modules, # Required. build_type => 'make' # || 'build'. 'make' is default. install_module => 'all', # || 'passed'. 'all' is default. skip_tests => 1, # skips the tests. test_directory_format => ['t/', 'tests/'], # Optional, defaults to ['t/']. test_file_format => ['.t', '.pl'], # Optional, defaults to ['.t']. test_order => 'ordered', # || 'random'. 'ordered' is default. });
Create a new Test::Nightly::Test object.
modules is an array of the hash refs that include the path to the module and the build script name. It isn't required that you supply this because the directories are found from the Test::Nightly object. Basically you probably shouldn't be calling this package on it's own, rather use the Test::Nightly as your interface, but if you really want to you can.
modules
The rest of the inputs are described below in the List of Methods.
$test->run({ # ... can take the same arguments as new() ... });
Loops through the supplied modules, makes those modules and runs their tests.
Pass this in so we know how you build your modules. There are two options: 'build' and 'make'. Defaults to 'make'.
Pass this in if you wish to have the module installed.
List of modules. Usually is generated when you call Test::Nightly new method, however it is possible to pass it in directly here. Structure is like so:
@modules = ( { 'directory' => '/dir/to/module01/', 'build_script' => 'Makefile.PL', }, { 'directory' => '/dir/to/module02/', 'build_script' => 'Makefile.PL', }, );
Pass this in if you wish to skip running the tests.
An array ref of what format the test directories can be. By default it searches for the tests in 't/'.
An array ref of the test file formats you have. e.g. @file_formats = ('.pl', '.t'); Defaults to ['.t'].
Pass this in if you wish to influence the way the tests are run. Either 'ordered' or 'random'. Detauls to 'ordered'.
Where the output is stored after running the tests.
Find a way to suppress the output while the tests are running.
Kirstin Bettiol <kirstinbettiol@gmail.com>
(c) 2005 Kirstin Bettiol This library is free software, you can use it under the same terms as perl itself.
Test::Nightly, Test::Nightly::Test, Test::Nightly::Report, Test::Nightly::Email, Test::Nightly::Version, Test::Nightly::Coverage, perl.
1 POD Error
The following errors were encountered while parsing the POD:
You forgot a '=back' before '=head1'
To install Test::Nightly, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Test::Nightly
CPAN shell
perl -MCPAN -e shell install Test::Nightly
For more information on module installation, please visit the detailed CPAN module installation guide.