Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Re: Redirect output of Test::More/Simple

by GrandFather (Sage)
on Aug 28, 2006 at 09:40 UTC ( #569956=note: print w/replies, xml ) Need Help??

in reply to Redirect output of Test::More/Simple


Test::More->builder->output ('result.txt');

to have Test::More put it's output in a file called 'result.txt' and:

Test::More->builder->failure_output ('errors.txt');

to redirect error output to 'errors.txt'. See the Test::More section 'Extending and Embedding Test::More' and Test::Builder for more information.

DWIM is Perl's answer to Gödel

Replies are listed 'Best First'.
Re^2: Redirect output of Test::More/Simple
by spurperl (Priest) on Aug 28, 2006 at 14:59 UTC

    It seems to me that it's a bit too hidden for such a needed feature. I'm not a Perl newbie and even have experience with Test::More and I found it difficult to locate in the docs.

    Besides the most trivial cases, lots of tests usually run autonomously, and generate copious amounts of output which is best contained in a log file.

    I guess another solution in such cases is Test::Harness, which IIRC allows redirection of output from test scripts it runs.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://569956]
[LanX]: B::Concise has an obvious bug in the example code ...
[LanX]: ... and I wouldn't be surprised if it hasn't been spoted for 10 years already
[LanX]: http://perldoc. .html#Example%3a- Altering-Concise- Renderings
[LanX]: :-/
[Corion]: Heh ;)
[Corion]: I might do a release of Filter::Simple, which has/"causes" bugs in line numbering, which also hasn't bothered too many people ;)
[choroba]: LanX do you mean s/add_style/ set_style/?

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (9)
As of 2017-04-24 15:04 GMT
Find Nodes?
    Voting Booth?
    I'm a fool:

    Results (442 votes). Check out past polls.