Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^3: using Test::* modules for generic testing of non perl stuff?

by biosysadmin (Deacon)
on Oct 15, 2004 at 21:04 UTC ( #399663=note: print w/ replies, xml ) Need Help??


in reply to Re^2: using Test::* modules for generic testing of non perl stuff?
in thread using Test::* modules for generic testing of non perl stuff?

I used the word "misuse" because I think that the Test::* modules were originally used for testing code, and I've adapted them to some orthogonal uses.

At it's most fundamental, you just need to define a set of "things" you want to test and define their acceptable output. This can be tricky, as you might need to define a range of acceptable output values. One strategy that I've used in the past is to predefine a hash like this:

%commands = { $cmd1 => $output1, ... };
Then execute the commands and test the dynamic output against the predefined output.

I've actually got to run and catch a plane, but I'll be sure to check on this thread when I get back. Cheers. :)


Comment on Re^3: using Test::* modules for generic testing of non perl stuff?
Download Code
Re^4: using Test::* modules for generic testing of non perl stuff?
by jfroebe (Vicar) on Oct 15, 2004 at 21:21 UTC

    I understand where you're coming from now. I *think* the Test::* should work okay as long as I code a pass/fail. What I do like is the fact that the Test::* are already built and are relatively simple to use. I agree that depending on what I'm testing, I might have to shoehorn it.

    I guess I'm looking for reasons NOT to use it.. At this point, I see only that some extra coding of the test may only need to be done.. But since I've fallen for too good to be true with some perl modules on cpan before (fits my need but no maintainer, doesn't fit my need exactly but maintainer goes ballistic when I submit a patch extending it without getting permission first from the maintainer to modify the module in the first place for my own use, etc.), I'm skeptical

    Jason L. Froebe

    p.s. Hava a good flight! No delays!

    No one has seen what you have seen, and until that happens, we're all going to think that you're nuts. - Jack O'Neil, Stargate SG-1

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (14)
As of 2014-12-17 20:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (33 votes), past polls