Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: A brief question about testing/best practices

by choroba (Cardinal)
on Jan 20, 2015 at 16:53 UTC ( [id://1113899]=note: print w/replies, xml ) Need Help??


in reply to A brief question about testing/best practices

If you want to have 100% testable code, you have to change your coding habits. It means your main program basically becomes
use ModuleA; use ModuleB; use Runner; Runner::run(@ARGV);

As an intermediate step, you can also test existing programs by calling them via an IPC method and examining the output or exit status.

لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Replies are listed 'Best First'.
Re^2: A brief question about testing/best practices
by Amblikai (Scribe) on Jan 20, 2015 at 20:26 UTC

    Thanks, what do you mean by an IPC method?

      He means "Inter-Process Communication". Some other program calls your program, or vice versa.

      So if you have a program that is supposed to check a web service in a couple ways, you get some other second program to call yours with the various inputs needed, and then you have that second one check the output it got from each way you called the service.

      It's called "black-box testing". See my other reply.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2024-04-24 05:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found