NAME

Test::Run::CmdLine - Analyze tests from the command line using Test::Run

SYNOPSIS

use Test::Run::CmdLine;

my $tester = Test::Run::CmdLine->new(
    {
        'test_files' => ["t/one.t", "t/two.t"],
    },
);

$tester->run();

Interface Functions

$tester = Test::Run::CmdLine->new({'test_files' => \@test_files, ....});

Initializes a new testing front end. test_files is a named argument that contains the files to test.

Other named arguments are:

backend_params

This is a hash of named parameters to be passed to the backend class (derived from Test::Run::Obj.)

driver_class

This is the backend class that will be instantiated and used to perform the processing. Defaults to Test::Run::Obj.

$tester->run()

Actually runs the tests on the command line.

TODO : Write more.

BUILD

For Moose.

Environment Variables

The following environment variables (%ENV) affect the behaviour of Test::Run::CmdLine:

HARNESS_COLUMNS

This determines the width of the terminal (sets 'Columns') in Test::Run::Obj). If not specified, it will be determined according to the COLUMNS environment variable, that is normally specified by the terminal.

HARNESS_DEBUG

Triggers the 'Debug' option in Test::Run::Obj. Meaning, it will print debugging information about itself as it runs the tests.

HARNESS_FILELEAK_IN_DIR

This variable points to a directory that will be monitored. After each test file, the module will check if new files appeared in the direcotry and report them.

It is advisable to give an absolute path here. If it is relative, it would be relative to the current working directory when $tester->run() was called.

HARNESS_NOTTY

Triggers the 'NoTty' option in Test::Run::Obj. Meaning, it causes Test::Run::CmdLine not to treat STDOUT as if it were a console. In this case, it will not emit more frequent progress reports using carriage returns ("\r"s).

HARNESS_PERL

Specifies the 'Test_Interpreter' variable of Test::Run::Obj. This allows specifying a different Perl interprter to use besides $^X.

HARNESS_PERL_SWITCHES

Specifies the 'Switches' variable of Test::Run::Obj. This allows specifying more switches to the Perl interpreter.

HARNESS_TIMER

This variable triggers the 'Timer' option in Test::Run::Obj. What it does is causes the time that took for tests to run to be displayed.

HARNESS_VERBOSE

Triggers the 'Verbose' option in Test::Run::Obj. Meaning, it emits the standard output of the test files while they are processed.

Internal Functions

my $args_array_ref = $tester->get_backend_args()

Calculate and retrieve the arguments for the backend class (that inherits from Test::Run::Obj) as a single array reference. Currently it appends the arguments of get_backend_env_args() to that of get_backend_init_args().

$self->private_backend_args()

Calculates the get_backend_args()-specific arguments for this class.

$tester->get_backend_env_args()

Calculate the arguments for the backend class, that originated from the environment (%ENV), and puts them in $tester-backend_env_args()>

$self->private_direct_backend_env_mapping()

The return value of this method is collected from every class, and adapted to the direct backend environment mapping.

my $args_array_ref = $tester->get_backend_init_args()

Calculate and return the arguments for the backend class, that originated from the arguments passed to the (front-end) object from its constructor.

$self->private_backend_plugins()

Calculates the backend plugins specific for this class. They will be collected to formulate a list of plugins that will be add_to_backend_plugins()'ed.

$self->add_to_backend_plugins($plugin)

Appends a plugin to the plugins list. Useful in front-end plug-ins.

AUTHORS

Shlomi Fish, <shlomif@iglu.org.il>

BUGS

Please report any bugs or feature requests to bug-test-run-cmdline@rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Test-Run-CmdLine. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc Test::Run::CmdLine

You can also look for information at:

SOURCE AVAILABILITY

The latest source of Test::Run::CmdLine is available from the Test::Run BerliOS Subversion repository:

https://svn.berlios.de/svnroot/repos/web-cpan/Test-Harness-NG/

ACKNOWLEDGEMENTS

COPYRIGHT & LICENSE

Copyright 2005 Shlomi Fish, all rights reserved.

This program is released under the MIT X11 License.