P is for Practical | |
PerlMonks |
Interactive Testsby starX (Chaplain) |
on Feb 15, 2008 at 19:31 UTC ( [id://668228]=perlquestion: print w/replies, xml ) | Need Help?? |
starX has asked for the wisdom of the Perl Monks concerning the following question:
In developing my latest module, I've run into a problem that I haven't been able to easily solve through the usual testing mechanisms. These modules need to parse a vendor supplied spread sheet, and then format the data to match what we have in our database.
The first problem is that the vendor supplied price sheets are seldom consistent, even even when coming from the same vendor, so there are some run time control mechanisms that I've been using in the application to control that. The second problem is that, depending on the type of product line, products should be formatted differently, and after speaking with some of the operations folks, they've decided that the easiest way might be to have whoever is importing the price sheet do a visual check of the output. So in the first case, I would like to be able to specify to the test a couple items at run time (like the vendor and the price sheet), and in the second, I would like the test to display an example of the output and ask the user if it looks okay. Unfortunately my efforts to pass in command line parameters (make test VENDOR /path/to/file) to the test using: Appear to have failed, but I must confess that this appearance of failure may be that Test::More is swallowing up all standard output. Which is consequently why I can't do this: So far the best advice I could find was that Test::More does in fact swallow up all STDOUT, and that if I wanted it to work this way, I could try using STDERR, but that seems like it could easily lead to its own problems down the line. Anyone have any advice on how to proceed? Or does this sound like something Test::More won't be able to handle?
--starX
Back to
Seekers of Perl Wisdom
|
|