In most cases, the tests operate on one or more .pm modules, exercising their functions, method calls, etc. testing out the scenarios. Sometimes a CPAN module delivers one or more "exe_files", which are scripts. Examples of this are dbish and lwp_rget. I also count sub shell inside CPAN.pm and CPANPLUS.pm as a script: it's just a script that is wrapped up inside the .pm module itself.
Some people may argue that scripts that accompany modules do not require tests as they contain no functionality - merely calls to the .pm module code. I disagree.
As far as I can see, these scripts are delivered with little or no collateral by way of accompanying documenation and tests (though there are probably exceptions to this). As far as I am concerned, the "exe_files" are deliverables which also need tests to verify that they are working correctly. The nature of the script in question, and its tests, could be one of the following:
As is apparent, I don't think that there is a single one-size-fits-all test harness for scripts, but I am interested in whether any modules exist which cover the framework of testing each of the types of script above. I'm also keen on keeping the tests portable, hence not relying on operating system dependent IPC mechanisms.
--
I'm Not Just Another Perl Hacker
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: A test harness for scripts
by dragonchild (Archbishop) on Feb 07, 2004 at 16:54 UTC | |
by petdance (Parson) on Feb 10, 2004 at 02:13 UTC | |
|
Re: A test harness for scripts
by hardburn (Abbot) on Feb 07, 2004 at 14:18 UTC | |
|
Re: A test harness for scripts
by drfrog (Deacon) on Feb 08, 2004 at 09:29 UTC | |
|
Re: A test harness for scripts
by etcshadow (Priest) on Feb 08, 2004 at 20:42 UTC | |
|
Re: A test harness for scripts
by petdance (Parson) on Feb 10, 2004 at 02:17 UTC |