[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cgiapp] CGI::Application Testing Methodologies


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://www.erlbaum.net/mailman/listinfo/cgiapp    ##
##                                                            ##
##  Web archive:   http://www.erlbaum.net/pipermail/cgiapp/   ##
##  Wiki:          http://cgiapp.erlbaum.net/                 ##
##                                                            ##
################################################################

#####  CGI::Application community mailing list  ################
##                                                            ##
##  To unsubscribe, or change your message delivery options,  ##
##  visit:  http://www.erlbaum.net/mailman/listinfo/cgiapp    ##
##                                                            ##
##  Web archive:   http://www.erlbaum.net/pipermail/cgiapp/   ##
##  Wiki:          http://cgiapp.erlbaum.net/                 ##
##                                                            ##
################################################################


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.