Testing Perl scripts (not modules)

Discussion in 'Perl Misc' started by Bob, Jul 13, 2004.

  1. Bob

    Bob Guest

    Sometimes I have rather large scripts. I have read up on testing
    (Test::Simple etc.) but they all seam to deal with testing modules. Do
    you test your scripts using the same stuff, do you not test scripts,
    or is there another paradigm for testing scripts?

    Robert
     
    Bob, Jul 13, 2004
    #1
    1. Advertising

  2. On Tue, 13 Jul 2004 08:37:23 -0700, Bob wrote:

    > Sometimes I have rather large scripts. I have read up on testing
    > (Test::Simple etc.) but they all seam to deal with testing modules. Do
    > you test your scripts using the same stuff, do you not test scripts,
    > or is there another paradigm for testing scripts?


    I usually create a test environment that I have as much control over,
    execute the script and compare the results to the expected results. Salt
    to taste :)

    You can use one of the many Test::* modules to automate the task ... I
    just find it easier to just run the sucker and see what happens ... in a
    controlled environment.

    Just a side note: if the scripts are that complex, you may want to think
    about combining some common functionality into smaller scripts. The more
    complex a script/application/etc. is, the more prone to unanticipated
    failure it is. NTM the maintenance headache that one experiences later
    on :)

    HTH
    --
    Jim

    Copyright notice: all code written by the author in this post is
    released under the GPL. http://www.gnu.org/licenses/gpl.txt
    for more information.

    a fortune quote ...
    Anybody with money to burn will easily find someone to tend the
    fire.
     
    James Willmore, Jul 13, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jan Danielsson
    Replies:
    8
    Views:
    644
    Mike Meyer
    Jul 22, 2005
  2. Jp Calderone
    Replies:
    0
    Views:
    467
    Jp Calderone
    Jul 21, 2005
  3. davidj411
    Replies:
    0
    Views:
    551
    davidj411
    Jun 27, 2008
  4. king
    Replies:
    0
    Views:
    95
  5. Replies:
    13
    Views:
    553
    Anno Siegel
    Sep 10, 2007
Loading...

Share This Page