Kirstin Bettiol > Test-Nightly > Test::Nightly::Test

Download:
Test-Nightly-0.03.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  3
Open  0
View/Report Bugs
Module Version: 0.03   Source  

NAME ^

Test::Nightly::Test - Make and runs your tests.

DESCRIPTION ^

Designed to run our tests, and then store the results back into the object. You probably should not be dealing with this module directly.

SYNOPSIS ^

  use Test::Nightly::Test;

  my $test = Test::Nightly::Test->new();

  $test->run();

The following methods are available:

new()

  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.

The rest of the inputs are described below in the List of Methods.

run()

  $test->run({
    # ... can take the same arguments as new() ... 
  });

Loops through the supplied modules, makes those modules and runs their tests.

List of methods: ^

build_type

Pass this in so we know how you build your modules. There are two options: 'build' and 'make'. Defaults to 'make'.

install_module

Pass this in if you wish to have the module installed.

modules

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', }, );

skip_tests

Pass this in if you wish to skip running the tests.

test_directory_format

An array ref of what format the test directories can be. By default it searches for the tests in 't/'.

test_file_format

An array ref of the test file formats you have. e.g. @file_formats = ('.pl', '.t'); Defaults to ['.t'].

test_order

Pass this in if you wish to influence the way the tests are run. Either 'ordered' or 'random'. Detauls to 'ordered'.

tests

Where the output is stored after running the tests.

TODO ^

Find a way to suppress the output while the tests are running.

AUTHOR ^

Kirstin Bettiol <kirstinbettiol@gmail.com>

COPYRIGHT ^

(c) 2005 Kirstin Bettiol This library is free software, you can use it under the same terms as perl itself.

SEE ALSO ^

Test::Nightly, Test::Nightly::Test, Test::Nightly::Report, Test::Nightly::Email, Test::Nightly::Version, Test::Nightly::Coverage, perl.

syntax highlighting: