Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

djberg96 (2603)

  (email not shown publicly)

Journal of djberg96 (2603)

Tuesday September 24, 2002
11:53 AM

Test suites for net stuff

[ #7970 ]
I've been reading a lot of entries about Mr. Schwern's test module and testing in general. That has me thinking about my currently incomplete test script for Net::SCP::Expect and I have some generic questions.

Is there a standard way to test modules that rely on remote connections of some sort? I mean, the goal of scp is to put a file from one system onto another. The problem is, is there a reliable way to check success or failure for something like scp?

My general feeling on the subject was that it was just easier for you, the user, to just eyeball the results. In other words, just manually check to see if it copied successfully and the file sizes are correct. Otherwise, I'm looking at a scenario where I generate my own test file, check the size, scp to a user-specified host, somehow telnet into that machine, check for the file's existence and file size, then report back to the user.

Easy enough, but ONLY if the remote host allows port 23 connections. Since you're using scp in first place, there's a good chance it won't and I certainly can't assume that it will. In that case, then the only recourse is to make them install something like Net::SSH::Perl which has an incredible number of dependencies when you factor in everything (something like 25 modules, plus a math lib). All so that I can do the equivalent of "ls -l".

Should I simply add that as an option? i.e. "If you want a *real* test, install Net::SSH::Perl. Otherwise, eyeball it".

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.