rajeshT has asked for the wisdom of the Perl Monks concerning the following question:

Hi friends,

I would like to work with http recorder. But i am facing some problems in making it successful.
file: myproxy.pl

use strict;
use warnings;


use HTTP::Proxy;
use HTTP::Recorder;


#my $proxy = HTTP::Proxy->new();
my $proxy = HTTP::Proxy->new( port => 3128 );


# create a new HTTP::Recorder object
my $agent = new HTTP::Recorder;


# set the log file (optional)
$agent->file("C:\\Temp\\myfile");

# set HTTP::Recorder as the agent for the proxy
$proxy->agent( $agent );

# start the proxy
$proxy->start();


1;



I am working on windows OS.
I have successfully installed http::recorder module downloaded from http://ppm.activestate.com/PPMPackages/zips/8xx-builds-only/Windows/.
But i did n't find HTTP::Proxy module in http://ppm.activestate.com/PPMPackages/zips/8xx-builds-only/Windows/.
I found HTTP::Proxy module at CPAN and i installed using the following steps
perl Makefile.PL
nmake
nmake test
nmake install


The following error shown once the myproxy.pl file run and set IE setting for proxy as local host and port as 3128.


D:\perl programs>myproxy.pl Use of uninitialized value in pattern match (m//) at C:/Perl/site/lib/Email/MIME .pm line 90. Use of uninitialized value in pattern match (m//) at C:/Perl/site/lib/Email/MIME .pm line 90. Can't locate object method "query_param" via package "YMSG" (perhaps you forgot to load "YMSG"?) at C:/Perl/site/lib/HTTP/Recorder.pm line 347.

Then I Installed NET-YMSG module to overcome this. Still the same error shown. can any body help me to overcome these problems.

One more thing i would like to ask i.e. Is there any ppm package is available for "Http::proxy" module?

And what are the other steps do i need to follow in order to get the http::recorder control panel

Thanks in advance
  • Comment on Facing problems in setting up http recorder for web tesing

Replies are listed 'Best First'.
Re: Facing problems in setting up http recorder for web tesing
by syphilis (Archbishop) on May 23, 2007 at 13:44 UTC
    You can install version 0.20 of HTTP::Proxy and version 0.05 of HTTP::Recorder by running (respectively):
    ppm install http://theoryx5.uwinnipeg.ca/ppms/HTTP-Proxy.ppd ppm install http://theoryx5.uwinnipeg.ca/ppms/HTTP-Recorder.ppd
    Visit http://theoryx5.uwinnipeg.ca/ppms/ to see what else is available there.

    If you're not already running those versions, then you might find that your problem gets fixed by simply updating.

    I don't know what's going on regarding that error with "query_param" ... seems a bit odd. The error relates to package "YMSG" (whatever that is) not to package Net::YMSG - so installing Net::YMSG won't achieve anything. Line 347 of Recorder.pm is:
    for my $key ($content->query_param) {
    Apparently $content is a YMSG object (though I couldn't immediately see how that comes about, and quickly lost interest in trying to work it out). Perhaps someone else can shed some more light on that matter.

    Cheers,
    Rob
Re: Facing problems in setting up http recorder for web tesing
by Khen1950fx (Canon) on May 23, 2007 at 20:54 UTC
    See Re: problem with http::recorder for a script that will get you going. HTTP::Recorder is still experimental, at least for me. I wouldn't use it for production or serious testing.

    As of version 0.05, there is no control panel. You'll have to use an earlier version if you want that. Also, there are a number of prereqs that must be installed before you can use http-recorder. See: HTTP::Proxy

      Hi,
      Thanks for your inputs.


      file myproxy.pl

      use strict; use warnings; use HTTP::Proxy; use HTTP::Recorder; my $proxy = HTTP::Proxy->new( port => 3128 ); my $agent = new HTTP::Recorder; #Try C:\Desktop\Agent\log $agent->file("/home/Desktop/Agent/log"); $proxy->agent( $agent ); $agent->control(["http://127.0.0.1"]); $proxy->start(); 1;
      I have run the modified myproxy.pl file which was given. But,still i am getting the same error.
      So i thought problem with my installation and installed entire configurarion in another system.

      Installed ActivePerl-5.8.8.817-MSWin32-x86-257965.msi in another system and installed the following ppds.
      ppm install http://theoryx5.uwinnipeg.ca/ppms/HTTP-Request-Params.ppd
      ppm install http://theoryx5.uwinnipeg.ca/ppms/Email-MIME-Modifier.ppd
      ppm install http://theoryx5.uwinnipeg.ca/ppms/HTTP-Recorder.ppd
      ppm install http://theoryx5.uwinnipeg.ca/ppms/HTTP-Proxy.ppd
      after ran the myproxy.pl , i got the same error here also.

      The following error shown:
      D:\perl programs>myproxy.pl Use of uninitialized value in pattern match (m//) at C:/Perl/site/lib/ +Email/MIME.pm line 90. Use of uninitialized value in pattern match (m//) at C:/Perl/site/lib/ +Email/MIME.pm line 90. Use of uninitialized value in pattern match (m//) at C:/Perl/site/lib/ +Email/MIME.pm line 90. Use of uninitialized value in pattern match (m//) at C:/Perl/site/lib/ +Email/MIME.pm line 90. Use of uninitialized value in pattern match (m//) at C:/Perl/site/lib/ +Email/MIME.pm line 90. Use of uninitialized value in pattern match (m//) at C:/Perl/site/lib/ +Email/MIME.pm line 90. Use of uninitialized value in pattern match (m//) at C:/Perl/site/lib/ +Email/MIME.pm line 90. Use of uninitialized value in pattern match (m//) at C:/Perl/site/lib/ +Email/MIME.pm line 90. Use of uninitialized value in pattern match (m//) at C:/Perl/site/lib/ +Email/MIME.pm line 90. Use of uninitialized value in pattern match (m//) at C:/Perl/site/lib/ +Email/MIME.pm line 90. Use of uninitialized value in pattern match (m//) at C:/Perl/site/lib/ +Email/MIME.pm line 90. Use of uninitialized value in pattern match (m//) at C:/Perl/site/lib/ +Email/MIME.pm line 90. Can't locate object method "query_param" via package "YMSG" (perhaps y +ou forgot to load "YMSG"?) at C:/Perl/site/lib/HTTP/Recorder.pm line +347.

      Can anybody suggest to rectify this.