Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

Test harness

by palette (Scribe)
on May 30, 2008 at 11:50 UTC ( #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 running in scheduler.
It uses Test::Harness and executes all other test scripts

When the 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 > <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 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 1> out.txt 2>&1

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (1)
As of 2023-05-31 00:39 GMT
Find Nodes?
    Voting Booth?

    No recent polls found