Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Test Availability of HTTPS Web Application?

by IlyaM (Parson)
on May 29, 2002 at 10:39 UTC ( #170028=note: print w/replies, xml ) Need Help??


in reply to Test Availability of HTTPS Web Application?

++Kanji for LWP::UserAgent example. But Perl is TMTOWTDI. Here example which does similar thing via HTTP::WebTest.

#!/usr/bin/perl -w use strict; use HTTP::WebTest; my $url = shift; my $wt = HTTP::WebTest->new; # runs test and generates test report $wt->run_tests([ { url => $url } ]);

Note that you still have to install Crypt::SSL to get 'https' to work.

--
Ilya Martynov (http://martynov.org/)

Replies are listed 'Best First'.
Re: Test Availability of HTTPS Web Application?
by Beau Landeaux (Novice) on May 29, 2002 at 14:04 UTC
    I installed prerequisites TermReadKey-2.20, File-Temp-0.12, and Time-HiRes-01.20, but make test fails at 50% (below). Any ideas? Thanks, Beau
    % perl Makefile.PL HTTP-WebTest requires installation of the http-webtest directory for running local file tests. If you don't use local file tests you can skip installation of this directory. Install http-webtest directory? (y/n): y Default directory to install the http-webtest directory in is /usr/l +ocal/etc, but you should probably use another location if MYSQL is installed. Install http-webtest directory in /usr/local/etc? (y/n): y WARNING: If your system does not have an HTTP connection to the Inte +rnet or your system requires a proxy HTTP server, the "make test" tests will + fail. Writing Makefile for HTTP::WebTest % make mkdir blib mkdir blib/lib mkdir blib/lib/HTTP mkdir blib/arch mkdir blib/arch/auto mkdir blib/arch/auto/HTTP mkdir blib/arch/auto/HTTP/WebTest mkdir blib/lib/auto mkdir blib/lib/auto/HTTP mkdir blib/lib/auto/HTTP/WebTest mkdir blib/man1 mkdir blib/man3 cp WebTest.pm blib/lib/HTTP/WebTest.pm mkdir blib/script cp wt blib/script/wt /usr/bin/perl -I/usr/local/lib/perl5/5.6.0/sun4-solaris -I/usr/local +/lib/perl5/5.6.0 -MExtUtils::MakeMaker -e "MY->fixin(shift)" blib/sc +ript/wt Manifying blib/man3/HTTP::WebTest.3 Manifying blib/man1/wt.1 % make test PERL_DL_NONLAZY=1 /usr/bin/perl -Iblib/arch -Iblib/lib -I/usr/local/ +lib/perl5/5.6.0/sun4-solaris -I/usr/local/lib/perl5/5.6.0 -e 'use Tes +t::Harness qw(&runtests $verbose); $verbose=0; runtests @ARGV;' t/*.t t/404...............ok t/cookie............NOK 1FAILED test 1 Failed 1/1 tests, 0.00% okay t/form..............NOK 1FAILED test 1 Failed 1/1 tests, 0.00% okay t/yahoo.............ok Failed Test Status Wstat Total Fail Failed List of failed -------------------------------------------------------------------- +----------- t/cookie.t 1 1 100.00% 1 t/form.t 1 1 100.00% 1 Failed 2/4 test scripts, 50.00% okay. 2/4 subtests failed, 50.00% ok +ay. *** Error code 29 make: Fatal error: Command failed for target `test_dynamic'
      As I understand you are trying last "stable" release of HTTP::WebTest. It's tests rely on avilability of external web sites so they can fail if there any networking problem. Probably there is no actually any problems. Anyway you may try latest "development" version (avialable from http://www.cpan.org/authors/id/I/IL/ILYAM/HTTP-WebTest-1.99_06.tar.gz) . It is going to become new "official stable" release very soon so don't be scared trying "beta".

      Moreover my example will work only with latest "development" version becauses it uses new API.

      --
      Ilya Martynov (http://martynov.org/)

        Will do. Thank you for your assurances re "beta" AND for all your help. Beau

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://170028]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (2)
As of 2022-08-11 02:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?