Test::Run::CmdLine - Analyze tests from the command line using Test::Run
use Test::Run::CmdLine; my $tester = Test::Run::CmdLine->new( { 'test_files' => ["t/one.t", "t/two.t"], }, ); $tester->run();
Initializes a new testing front end. test_files is a named argument that contains the files to test.
test_files
Other named arguments are:
This is a hash of named parameters to be passed to the backend class (derived from Test::Run::Obj.)
This is the backend class that will be instantiated and used to perform the processing. Defaults to Test::Run::Obj.
Actually runs the tests on the command line.
TODO : Write more.
For Moose.
The following environment variables (%ENV) affect the behaviour of Test::Run::CmdLine:
%ENV
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.
'Columns'
COLUMNS
Triggers the 'Debug' option in Test::Run::Obj. Meaning, it will print debugging information about itself as it runs the tests.
'Debug'
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.
$tester->run()
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).
'NoTty'
"\r"
Specifies the 'Test_Interpreter' variable of Test::Run::Obj. This allows specifying a different Perl interprter to use besides $^X.
'Test_Interpreter'
$^X
Specifies the 'Switches' variable of Test::Run::Obj. This allows specifying more switches to the Perl interpreter.
'Switches'
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.
'Timer'
Triggers the 'Verbose' option in Test::Run::Obj. Meaning, it emits the standard output of the test files while they are processed.
'Verbose'
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().
Calculates the get_backend_args()-specific arguments for this class.
Calculate the arguments for the backend class, that originated from the environment (%ENV), and puts them in $tester-backend_env_args()>
$tester-
The return value of this method is collected from every class, and adapted to the direct backend environment mapping.
Calculate and return the arguments for the backend class, that originated from the arguments passed to the (front-end) object from its constructor.
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.
add_to_backend_plugins()
Appends a plugin to the plugins list. Useful in front-end plug-ins.
Shlomi Fish, http://www.shlomifish.org/ .
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.
bug-test-run-cmdline@rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc Test::Run::CmdLine
You can also look for information at:
CPAN Ratings
http://cpanratings.perl.org/d/Test::Run::CmdLine
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Test::Run::CmdLine
Search CPAN
http://search.cpan.org/dist/Test::Run::CmdLine/
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/
Copyright 2005 Shlomi Fish, all rights reserved.
This program is released under the MIT X11 License.
To install Test::Run::CmdLine, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Test::Run::CmdLine
CPAN shell
perl -MCPAN -e shell install Test::Run::CmdLine
For more information on module installation, please visit the detailed CPAN module installation guide.