Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: A brief question about testing/best practices

by choroba (Archbishop)
on Jan 20, 2015 at 16:53 UTC ( #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
Node Status?
node history
Node Type: note [id://1113899]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2021-01-19 02:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?