Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: How do you test end-user scripts?

by eyepopslikeamosquito (Archbishop)
on Sep 06, 2010 at 08:28 UTC ( [id://859023]=note: print w/replies, xml ) Need Help??


in reply to How do you test end-user scripts?

I endorse chromatic's comment. When writing scripts, I typically abstract the work they do into CPAN-like modules and unit test each module using Test::More and the prove command. I strive to keep my script mainlines as short as is practicable. There are many examples of this approach on the CPAN; see, for example, the perltidy command, part of the Perl-Tidy distribution and the perlcritic command, part of the Perl-Critic distribution.

See also: Effective Perl Programming, 2nd edition: Item 91, "Write programs as modulinos for easy testing"

Replies are listed 'Best First'.
Re^2: How do you test end-user scripts?
by JavaFan (Canon) on Sep 07, 2010 at 12:08 UTC
    I claim that isn't enough.

    If you bring in your car in, would you be satisfied if they just tested the battery, the steering, the transmission, etc, but never actually tried to drive the car and see if it runs? All individual components of you car may work according to the spec, but if they aren't connected correctly, you will still have to walk.

    Heck, for complete products, I'd say testing the final product is way more important than any unit testing.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://859023]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (8)
As of 2024-03-28 09:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found