perl-Test-LWP-UserAgent - a LWP::UserAgent suitable for simulating and testing network calls

Property Value
Distribution ALT Linux Sisyphus
Repository Autoimports noarch
Package name perl-Test-LWP-UserAgent
Package version 0.033
Package release alt1
Package architecture noarch
Package type rpm
Installed size 41.01 KB
Download size 41.01 KB
Official Mirror
This module is a subclass of the LWP::UserAgent manpage which overrides a few key
low-level methods that are concerned with actually sending your request over
the network, allowing an interception of that request and simulating a
particular response.  This greatly facilitates testing of client networking
code where the server follows a known protocol.
The synopsis describes a classic case where you want to test how your
application reacts to various responses from the server.  This module will let
you send back various responses depending on the request, without having to
set up a real server to test against.  This can be invaluable when you need to
test edge cases or error conditions that do not normally arise from the
There are a lot of different ways you can set up the response mappings, and
hook into this module; see the documentation for the individual interface
You can use a the PSGI manpage app to handle the requests - see examples/call_psgi.t
in this dist, and also the register_psgi entry elsewhere in this document below.
OR, you can route some or all requests through the network as normal, but
still gain the hooks provided by this class to test what was sent and
my $useragent = Test::LWP::UserAgent->new(network_fallback => 1);
'timeout was overridden properly',
'uri my code should have constructed',
'I should have gotten an OK response',


Package Version Architecture Repository
perl-Test-LWP-UserAgent - - -


Name Value
/usr/share/perl5 -
perl(HTTP/ -
perl(HTTP/ -
perl(HTTP/ -
perl(HTTP/ -
perl(LWP/ -
perl(Safe/ -
perl(Scalar/ -
perl( -
perl(Try/ -
perl( >= 1.620
perl(namespace/ >= 0.190
perl( -
rpmlib(PayloadIsLzma) -


Name Value
perl(Test/LWP/ = 0.033
perl-Test-LWP-UserAgent = 0.033-alt1


Type URL
Binary Package perl-Test-LWP-UserAgent-0.033-alt1.noarch.rpm
Source Package perl-Test-LWP-UserAgent-0.033-alt1.src.rpm

Install Howto

  1. Add the following line to /etc/apt/sources.list:
    rpm [Sisyphus] noarch autoimports
    rpm [Sisyphus] noarch autoimports
  2. Update the package index:
    # sudo apt-get update
  3. Install perl-Test-LWP-UserAgent rpm package:
    # sudo apt-get install perl-Test-LWP-UserAgent



See Also

Package Description
perl-Test-LatestPrereqs-0.02-alt1.noarch.rpm test if the required module versions are big enough
perl-Test-LatestPrereqs-scripts-0.02-alt1.noarch.rpm Test-LatestPrereqs scripts
perl-Test-Lazy-0.061-alt1.noarch.rpm A quick and easy way to compose and run tests with useful output
perl-Test-Leaner-0.05-alt1.noarch.rpm A slimmer Test::More for when you favor performance over completeness
perl-Test-Legacy-1.2502-alt1.noarch.rpm perl module Test-Legacy
perl-Test-Legal-0.10-alt1.noarch.rpm Test and (optionally) fix copyright notices, LICENSE file, and relevant field of META file
perl-Test-Legal-scripts-0.10-alt1.noarch.rpm Test-Legal scripts
perl-Test-Less-0.11-alt1.noarch.rpm Test Categorization and Subset Execution
perl-Test-Less-scripts-0.11-alt1.noarch.rpm perl-Test-Less scripts
perl-Test-Lib-0.002-alt2_6.noarch.rpm Use libraries from a t/lib directory
perl-Test-LimitDecimalPlaces-0.01-alt1.noarch.rpm Compare numerical values by limiting number of decimal places
perl-Test-Lite-0.009-alt2_10.noarch.rpm A small Perl Test Library
perl-Test-Litmus-0.03-alt1.noarch.rpm perl module Test-Litmus
perl-Test-Lives-1.002-alt1.noarch.rpm the 1UP approach to testing exceptional code
perl-Test-LoadAllModules-0.022-alt1.noarch.rpm do use_ok for modules in search path