Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Test harness

by palette (Scribe)
on May 30, 2008 at 11:50 UTC ( [id://689196]=perlquestion: print w/replies, xml ) Need Help??

palette has asked for the wisdom of the Perl Monks concerning the following question:

I have a script maketest.pl running in scheduler.
It uses Test::Harness and executes all other test scripts

When the maketest.pl is executed from command line all the tests and the results are displayed on the screen.

I need it to redirect to a file as it appears on the screen.

With that intention I tried doing, perl maketest.pl > <filename>.

But it only have a summary of the tests and it's not showing the details of all tests as it appears on the screen.

Nedd to know how to achieve this.

Replies are listed 'Best First'.
Re: Test harness
by skirnir (Monk) on May 30, 2008 at 12:49 UTC
    Sounds like you are redirecting STDOUT to <filename> when you really want STDERR.
    If you are in a Unix environment, try

    perl maketest.pl 2> <filename>

      But that would only put stderr in the file. To really put all text you see on screen to the file, use
      perl maketest.pl 1> out.txt 2>&1

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (1)
As of 2024-04-25 04:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found