[cgiapp] CGI::Application Testing Methodologies

Bill.Costa at unh.edu Bill.Costa at unh.edu
Wed Feb 20 11:18:44 EST 2008

> My advice would be to factor your code such that the code is
> separated into a testable module.

      This is excellent advice.  Try and write your 'back end'
      modules so that a browser is not needed to exercise them.
      Then for testing you write a simple script that can be
      executed from the command line to fully test all of the
      services provided by your module.  It then becomes a much
      simpler matter to create a test script that probes all of
      the expected operations as well as the boundary conditions
      and even pathological cases.  In other words, don't assume
      that service will always be given sane data from the front
      end.  Test for possible inputs that "should never happen".

      The book cited earlier will help you write those command
      line test scripts in a very efficient manner using well
      established and vetted test harness modules.

      An added benefit to this approach is, when you later have to
      make a change to one of these modules, you can run your
      tester to make sure you didn't accidentally break something
      else in the process.

      In this way testing the final app itself should be more
      about usability testing with humans rather than actually
      trying to test the correct functioning of lower level
      functions through the app's web interface.


+-------------------------[ Bill.Costa at UNH.EDU ]---+
| Bill Costa                                       |  No good
| 1 Leavitt Lane                 Voice:            |   deed...
|   CIS/Telecom -- 2nd Floor       +1-603-862-3056 |
|   University of New Hampshire                    |  Goes
| Durham, NH  03824       USA                      |   unpunished.
+---------------[ http://pubpages.unh.edu/~wfc/ ]--+

More information about the cgiapp mailing list