My little tool PerL based Utility for Messaging is almost done. It needs to be improved in several places, but it is actually usable now. It has following functions:
* send single request to server using different protocols, currently supports HTTP(Post) and JMS(Topic and Queue)
* compare response message with expected response
* Perl RE can be used for matching XML type response
* send a batch of requests and compare responses with expected responses
The utility is a web based application. I am thinking about adding a comand line tool which is more suitable for batch processing.
2006-01-25
Added login for the Catalyst application
I tried to add login for my testing utility which is a Catalyst based web application last night. I finished the code by carefully following the examples provided with document. Not too bad, just a couple of lines and I was done. But the application complained:
It seems that the later import (authentication related) overrode the previous import(session related). Thus the session method is missing because the module Session is not imported.
To fix this, just change the code to:
Can't locate object method "session" via package "myapp"
I went back and reviewed the code several times and could not figure out what was wrong. After hours of struggle, changing configurations, switching to different plugin modules, I finally got the reason. In my code, I used following statement to import several Catalyst plugins:use Catalyst qw/Static::Simple Session Session::State::Cookie Session::Store::File/;
use Catalyst qw/Authentication Authentication::Store::Minimal Authentication::Credential::Password/;
It seems that the later import (authentication related) overrode the previous import(session related). Thus the session method is missing because the module Session is not imported.
To fix this, just change the code to:
use Catalyst qw/-Debug Static::Simple Session
Session::State::Cookie Session::Store::File
Authentication Authentication::Store::Minimal
Authentication::Credential::Password
/;
Subscribe to:
Posts (Atom)