Lightweight unit testing for Perl.
Test::Mock::Guard is mock test library using RAII. This module is able
to change method behavior by each scope.
Test::Mock::LWP::Dispatch intends for testing a code that heavily uses
LWP::UserAgent.
Assume that function you want to test makes three different request to the
server and expects to get some content from the server. To test this function
you should setup request/response mappings for mocked UserAgent and test it.
For doing something with mappings, here are methods map, unmap and unmap_all.
For controlling context of these mappings (is it applies for all created in your
code LWP::UserAgent's or only to one specific?) you should call these functions
for exported $mock_ua object (global mapping) or for newly created
LWP::UserAgent (local mappings).
See also on Test::Mock::LWP, it provides mocked LWP objects for you, so probably
you can solve your problems with this module too.
Test::Weaken allows easy detection of unfreed Perl data and the
examination of unfreed objects, even those that would usually have
been made inaccessible.
This module allows you to deliberately hide modules from a program even though
they are installed. This is mostly useful for testing modules that have a
fallback when a certain dependency module is not installed.
Test::Mock::LWP provides easy mocking of LWP packages:
HTTP::Request, HTTP::Response, LWP and LWP::UserAgent.
Test::MockModule lets you temporarily redefine subroutines in other
packages for the purposes of unit testing.
Perl extension for emulating troublesome interfaces.
Test::MockTime was created to enable test suites to test code at
specific points in time. Specifically it overrides localtime, gmtime and
time at compile time and then relies on the user supplying a mock time
via set_relative_time, set_absolute_time or set_fixed_time to alter
future calls to gmtime, time or localtime.
Test::Modern provides the best features of Test::More, Test::Fatal,
Test::Warnings, Test::API, Test::LongString, and Test::Deep, as well as ideas
from Test::Requires, Test::DescribeMe, Test::Moose, and Test::CleanNamespaces.
Test::Modern also automatically imposes strict and warnings on your script, and
loads IO::File. (Much of the same stuff Modern::Perl does.)
Although Test::Modern is a modern testing framework, it should run fine on
pre-modern versions of Perl. It should be easy to install on Perl 5.8.9 and
above; and if you can persuade its dependencies to install (not necessarily
easy!), should be OK on anything back to Perl 5.6.1.