Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

test::regression(3pm) [debian man page]

Test::Regression(3pm)					User Contributed Perl Documentation				     Test::Regression(3pm)

NAME
Test::Regression - Test library that can be run in two modes; one to generate outputs and a second to compare against them VERSION
Version 0.05 SYNOPSIS
use Test::Regression; ok_regression(sub {return "hello world"}, "t/out/hello_world.txt"); DESCRIPTION
Using the various Test:: modules you can compare the output of a function against what you expect. However if the output is complex and changes from version to version, maintenance of the expected output could be costly. This module allows one to use the test code to generate the expected output, so that if the differences with model output are expected, one can easily refresh the model output. EXPORT
ok_regression FUNCTIONS
ok_regression This function requires two arguments: a CODE ref and a file path. The CODE ref is expected to return a SCALAR string which can be compared against previous runs. If the TEST_REGRESSION_GEN is set to a true value, then the CODE ref is run and the output written to the file. Otherwise the output of the file is compared against the contents of the file. There is a third optional argument which is the test name. ENVIRONMENT VARIABLES
TEST_REGRESSION_GEN If the TEST_REGRESSION_GEN environment file is unset or false in a perl sense, then the named output files must exist and be readable and the test will run normally comparing the outputs of the CODE refs against the contents of those files. If the environment variable is true in a perl sense, then model output files will be overwritten with the output of the CODE ref. AUTHOR
Nicholas Bamber, "<nicholas at periapt.co.uk>" BUGS
Please report any bugs or feature requests to "bug-test-regression at rt.cpan.org", or through the web interface at <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Test-Regression>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. testing of STDERR The testing of stderr from this module is not as thorough as I would like. Test::Builder::Tester allows turning off of stderr checking but not matching by regular expression. Handcrafted efforts currently fall foul of Test::Harness. Still it is I believe adequately tested in terms of coverage. SUPPORT
You can find documentation for this module with the perldoc command. perldoc Test::Regression You can also look for information at: o RT: CPAN's request tracker <http://rt.cpan.org/NoAuth/Bugs.html?Dist=Test-Regression> o AnnoCPAN: Annotated CPAN documentation <http://annocpan.org/dist/Test-Regression> o CPAN Ratings <http://cpanratings.perl.org/d/Test-Regression> o Search CPAN <http://search.cpan.org/dist/Test-Regression/> ACKNOWLEDGEMENTS
Some documentation improvements have been suggested by toolic (http://perlmonks.org/?node_id=622051). Thanks to Filip GraliXski for pointing out I need to test against output of zero length and providing a patch. COPYRIGHT &; LICENSE Copyright 2009-10 Nicholas Bamber. This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License. See http://dev.perl.org/licenses/ for more information. perl v5.10.1 2010-08-29 Test::Regression(3pm)

Check Out this Related Man Page

Test::Mock::Redis(3pm)					User Contributed Perl Documentation				    Test::Mock::Redis(3pm)

NAME
Test::Mock::Redis - use in place of Redis for unit testing VERSION
Version 0.08 SYNOPSIS
Test::Mock::Redis can be used in place of Redis for running tests without needing a running redis instance. use Test::Mock::Redis; my $redis = Test::Mock::Redis->new(server => 'whatever'); $redis->set($key, 'some value'); $redis->get($key); ... This module is designed to function as a drop in replacement for Redis.pm for testing purposes. See perldoc Redis and the redis documentation at <http://redis.io> SUBROUTINES
/METHODS new Create a new Test::Mock::Redis object. It can be used in place of a Redis object for unit testing. It accepts the "server" argument, just like Redis.pm's new. TODO
Lots! Not all Redis functionality is implemented. The test files that output "TODO" are still to be done. The top of all test files [except 01-basic.t] has the list of commands tested or to-be tested in the file. Those marked with an "x" are pretty well-tested. Those marked with an "o" need help. Those that are unmarked have no tests, or are un- implemented. For example: x AUTH <--- has some tests o KEYS <--- only partially tested and/or implemented ZINTERSTORE <--- not tested (or maybe not implemented) Beyond that, it would be neat to add methods to inspect how often keys were accessed and get other information that allows the module user to confirm that their code interacted with redis (or Test::Mock::Redis) as they expected. AUTHOR
Jeff Lavallee, "<jeff at zeroclue.com>" SEE ALSO
The real Redis.pm client whose interface this module mimics: <http://search.cpan.org/dist/Redis> BUGS
Please report any bugs or feature requests to "bug-mock-redis at rt.cpan.org", or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Test-Mock-Redis <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Test-Mock-Redis>. 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::Mock::Redis You can also look for information at: o RT: CPAN's request tracker http://rt.cpan.org/NoAuth/Bugs.html?Dist=Test-Mock-Redis <http://rt.cpan.org/NoAuth/Bugs.html?Dist=Test-Mock-Redis> o AnnoCPAN: Annotated CPAN documentation http://annocpan.org/dist/Test-Mock-Redis <http://annocpan.org/dist/Test-Mock-Redis> o CPAN Ratings http://cpanratings.perl.org/d/Test-Mock-Redis <http://cpanratings.perl.org/d/Test-Mock-Redis> o Search CPAN http://search.cpan.org/dist/Test-Mock-Redis/ <http://search.cpan.org/dist/Test-Mock-Redis/> ACKNOWLEDGEMENTS
Salvatore Sanfilippo for redis, of course! Dobrica Pavlinusic & Pedro Melo for Redis.pm LICENSE AND COPYRIGHT
Copyright 2011 Jeff Lavallee. This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License. See http://dev.perl.org/licenses/ for more information. perl v5.14.2 2012-04-16 Test::Mock::Redis(3pm)
Man Page