Index | index by Group | index by Distribution | index by Vendor | index by creation date | index by Name | Mirrors | Help | Search |
Name: perl-Test-LWP-UserAgent | Distribution: openSUSE:Factory:zSystems |
Version: 0.036 | Vendor: openSUSE |
Release: 1.11 | Build date: Mon Jan 17 04:08:40 2022 |
Group: Unspecified | Build host: reproducible |
Size: 71756 | Source RPM: perl-Test-LWP-UserAgent-0.036-1.11.src.rpm |
Packager: https://bugs.opensuse.org | |
Url: https://metacpan.org/release/Test-LWP-UserAgent | |
Summary: LWP::UserAgent suitable for simulating and testing network calls |
This module is a subclass of LWP::UserAgent 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 networking client code where the server follows a known protocol. The synopsis describes a typical 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 are not normally returned from the server. 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 methods. You can use a PSGI app to handle the requests - see _examples/call_psgi.t_ in this distribution, and also register_psgi 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 received: my $useragent = Test::LWP::UserAgent->new(network_fallback => 1); or: $useragent->map_network_response(qr/real.network.host/); is( $useragent->last_useragent->timeout, 180, 'timeout was overridden properly', ); is( $useragent->last_http_request_sent->uri, 'uri my code should have constructed', ); is( $useragent->last_http_response_received->code, '200', 'I should have gotten an OK response', );
Artistic-1.0 OR GPL-1.0-or-later
* Mon Jan 17 2022 Tina Müller <timueller+perl@suse.de> - updated to 0.036 see /usr/share/doc/packages/perl-Test-LWP-UserAgent/Changes 0.036 2022-01-16 04:11:38Z - use http rather than https URIs in network tests 0.035 2022-01-15 03:45:06Z - fix network test that failed due to a broken redirect service * Sat Mar 07 2020 <timueller+perl@suse.de> - updated to 0.034 see /usr/share/doc/packages/perl-Test-LWP-UserAgent/Changes 0.034 2020-03-06 04:22:25Z - fix t/10-request-args-network.t under EXTENDED_TESTING=1 where the test URL was returning random content for each request and therefore failing a comparison check * Thu May 18 2017 coolo@suse.com - updated to 0.033 see /usr/share/doc/packages/perl-Test-LWP-UserAgent/Changes 0.033 2017-05-18 00:46:41Z - fix network tests that failed from 0.032, due to inadequate author testing before release * Thu May 04 2017 coolo@suse.com - updated to 0.032 see /usr/share/doc/packages/perl-Test-LWP-UserAgent/Changes 0.032 2017-05-03 22:57:18Z - convert network tests to using httpbin.org, to not rely on iana.org not changing their content * Wed Nov 02 2016 coolo@suse.com - updated to 0.031 see /usr/share/doc/packages/perl-Test-LWP-UserAgent/Changes 0.031 2016-11-02 04:15:38Z - warnings are only checked for in tests under AUTHOR_TESTING, so as to not prevent installation when warnings occur in prerequisites. * Sun Aug 23 2015 coolo@suse.com - updated to 0.030 see /usr/share/doc/packages/perl-Test-LWP-UserAgent/Changes 0.030 2015-08-17 00:07:37Z - change network tests from hitting example.com to cpan.org, in the hopes of getting past more testers' firewalls - factor a few bits of HTTP::Response-specific code out into private methods, to ease future refactoring - some clarification and expansion to documentation * Sun Jun 07 2015 coolo@suse.com - updated to 0.029 see /usr/share/doc/packages/perl-Test-LWP-UserAgent/Changes 0.029 2015-05-23 03:43:46Z - add use of Test::RequiresInternet to avoid failing tests on smokers that are failing to set NO_NETWORK_TESTING when running behind a firewall * Tue Apr 14 2015 coolo@suse.com - updated to 0.028 see /usr/share/doc/packages/perl-Test-LWP-UserAgent/Changes 0.028 2015-04-10 22:38:29Z - report on the versions of more networking modules, to try to track down mysterious failed network connections during testing 0.027 2015-02-26 04:57:32Z - register_psgi, unregister_psgi, map_response, map_network_response and unmap_all all return their invocant, to allow for method chaining (Tom Hukins, github #2) * Fri Feb 13 2015 coolo@suse.com - initial package 0.026 * created by cpanspec 1.78.08
/usr/lib/perl5/vendor_perl/5.40.0/Test /usr/lib/perl5/vendor_perl/5.40.0/Test/LWP /usr/lib/perl5/vendor_perl/5.40.0/Test/LWP/UserAgent.pm /usr/share/doc/packages/perl-Test-LWP-UserAgent /usr/share/doc/packages/perl-Test-LWP-UserAgent/CONTRIBUTING /usr/share/doc/packages/perl-Test-LWP-UserAgent/Changes /usr/share/doc/packages/perl-Test-LWP-UserAgent/README /usr/share/doc/packages/perl-Test-LWP-UserAgent/docs /usr/share/doc/packages/perl-Test-LWP-UserAgent/docs/advent_2012.pod /usr/share/doc/packages/perl-Test-LWP-UserAgent/examples /usr/share/doc/packages/perl-Test-LWP-UserAgent/examples/MyApp /usr/share/doc/packages/perl-Test-LWP-UserAgent/examples/MyApp/Client.pm /usr/share/doc/packages/perl-Test-LWP-UserAgent/examples/advent_2012_1.pl /usr/share/doc/packages/perl-Test-LWP-UserAgent/examples/advent_2012_2.pl /usr/share/doc/packages/perl-Test-LWP-UserAgent/examples/advent_2012_3.pl /usr/share/doc/packages/perl-Test-LWP-UserAgent/examples/application_client_test.t /usr/share/doc/packages/perl-Test-LWP-UserAgent/examples/call_psgi.t /usr/share/doc/packages/perl-Test-LWP-UserAgent/examples/myapp.psgi /usr/share/licenses/perl-Test-LWP-UserAgent /usr/share/licenses/perl-Test-LWP-UserAgent/LICENCE /usr/share/man/man3/Test::LWP::UserAgent.3pm.gz
Generated by rpm2html 1.8.1
Fabrice Bellet, Tue Sep 10 00:47:10 2024