Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Re: Writing unit test scripts for .pl scripts

by stiller (Friar)
on May 05, 2008 at 09:01 UTC ( #684580=note: print w/replies, xml ) Need Help??

in reply to Writing unit test scripts for .pl scripts

I guess the best would be to start small, and avoiding changing any code before you have some basic testing to verify the work done inside the black box, and when that is in place, consider refactoring the code so that individual modules / subs can be verified.

To do that, you could start verifying the data the script is supposed to work on is what they are supposed to be. Then that the result is what it should be for a given set of input data.

How to do that is quite dependent on what the scripts do, and where they get the data and where they put the result. It's greatly simplified if the datasource and result locations are parameters to the script. If it's not, you might have to alter the scripts a litle to be able to give alternate params for test runs, but in such a way that other callers are not affected.

You need to tell more about the spesifics...

  • Comment on Re: Writing unit test scripts for .pl scripts

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://684580]
[hippo]: Anyone able to get to https://deps. Not even getting a connection from here.
[choroba]: Down for everyone of just me
[shmem]: "Problem loading page" here
[marto]: seems down
[planetscape]: Able to ping but not connect with either Opera or Firefox
[thanos1983]: same here...
[choroba]: marto ;-)
[Discipulus]: after an error now is back
[shmem]: looks like a 302 loop - "The document has moved here"
[Discipulus]: ..but only http not https

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (13)
As of 2018-02-20 11:53 GMT
Find Nodes?
    Voting Booth?
    When it is dark outside I am happiest to see ...

    Results (271 votes). Check out past polls.