[cgiapp] CGI::Application Testing Methodologies

Jason Purdy jason at journalistic.com
Wed Feb 20 10:57:05 EST 2008


Hi Mark,

This is a great topic and we have discussed it before on this list (we 
should really update the wiki page).

That said, writing webapp tests are really hard these days, what with 
AJAX and other JavaScript niceties not being supported in WWW::Mech. 
Then there's the spectrum of which layer do you want to test on? 
Library layer, CGIApp layer, Apache layer or web browser layer.

My advice would be to factor your code such that the code is separated 
into a testable module.  If your delete_customer function works as 
expected, then all the layers above should work as well since those 
layers are independently tested.

My advice goes without reading the previously touted Testing book, which 
I plan on reading at some point.  My advice also goes without seeing 
mpeters' response, which if he does, will offer more truth and 
experience. :)

- Jason

Mark Knoop wrote:
> Hi
> 
> ####
> 
> Testing
> -------
> 
> CGI::Application currently has no built-in testing methodology but we 
> leave that up to you. There are many testing structures and frameworks 
> that are available for testing Perl modules (ie, Test::Harness, 
> Test::More). There are large numbers of tools and frameworks for testing 
> live web applications (WWW::Mechanize, HTTP::Test, Apache::Test). We 
> encourage you to look around CPAN and find the one that best meets your 
> needs.
> 
> ####
> 
> I read this. But being both new to CGI::Application and a bit green on 
> implementing proper test plans I wondered whether anyone knows of an 
> article or tutorial that covers this area?
> 
> Failing that any one sentence pointers on which approaches work for 
> others would be much appreciated.
> 
> Mark
> 
> #####  CGI::Application community mailing list  ################
> ##                                                            ##
> ##  To unsubscribe, or change your message delivery options,  ##
> ##  visit:  http://lists.openlib.org/mailman/listinfo/cgiapp    ##
> ##                                                            ##
> ##  Web archive:   http://lists.openlib.org/pipermail/cgiapp/   ##
> ##  Wiki:          http://cgiapp.erlbaum.net/                 ##
> ##                                                            ##
> ################################################################


More information about the cgiapp mailing list