Name : perl-Test-WWW-Mechanize-PSGI
| |
Version : 0.390.0
| Vendor : obs://build_opensuse_org/devel:languages:perl
|
Release : 1.4
| Date : 2019-03-30 07:45:11
|
Group : Unspecified
| Source RPM : perl-Test-WWW-Mechanize-PSGI-0.390.0-1.4.src.rpm
|
Size : 0.05 MB
| |
Packager : (none)
| |
Summary : Test PSGI programs using WWW::Mechanize
|
Description :
PSGI is a specification to decouple web server environments from web application framework code. Test::WWW::Mechanize is a subclass of WWW::Mechanize that incorporates features for web application testing. The Test::WWW::Mechanize::PSGI module meshes the two to allow easy testing of PSGI applications.
Testing web applications has always been a bit tricky, normally requiring starting a web server for your application and making real HTTP requests to it. This module allows you to test PSGI web applications but does not require a server or issue HTTP requests. Instead, it passes the HTTP request object directly to PSGI. Thus you do not need to use a real hostname: \"http://localhost/\" will do. However, this is optional. The following two lines of code do exactly the same thing:
$mech->get_ok(\'/action\'); $mech->get_ok(\'http://localhost/action\');
This makes testing fast and easy. Test::WWW::Mechanize provides functions for common web testing scenarios. For example:
$mech->get_ok( $page ); $mech->title_is( \"Invoice Status\", \"Make sure we\'re on the invoice page\" ); $mech->content_contains( \"Andy Lester\", \"My name somewhere\" ); $mech->content_like( qr/(cpan|perl)\\.org/, \"Link to perl.org or CPAN\" );
An alternative to this module is Plack::Test.
|
RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/devel:/languages:/perl/openSUSE_Tumbleweed/noarch |