How to integrate other scripts with Test::Harness?

Discussion in 'Perl Misc' started by yusuf, Aug 7, 2006.

  1. yusuf

    yusuf Guest

    Hi,

    I was trying to use Test::Harness to gather output from my bash scripts
    as well, and I'm having problems with items being printed by the
    script.

    How do I get all stdout and stderr from the script to be just printed
    by the Test::Harness, rather than disappearing?

    Thanks.
    yusuf, Aug 7, 2006
    #1
    1. Advertising

  2. yusuf

    Paul Lalli Guest

    yusuf wrote:

    > I was trying to use Test::Harness to gather output from my bash scripts
    > as well, and I'm having problems with items being printed by the
    > script.
    >
    > How do I get all stdout and stderr from the script to be just printed
    > by the Test::Harness, rather than disappearing?


    In the past, you've been asked by several people - myself included - to
    post a SHORT but COMPLETE script when you have difficulties. Why do
    you continue to refuse to do that? Why do you continue to expect free
    help without following even the most simple of requests?

    Additionally, please read the documentation for the module you are
    using. In this case, perldoc Test::Harness shows:
    ==============================
    STOP! If all you want to do is write a test script, consider using
    Test::Simple. Test::Harness is the module that reads the output from
    Test::Simple, Test::More and other modules based on Test::Builder. You
    don't need to know about Test::Harness to use those modules.

    Test::Harness runs tests and expects output from the test in a certain
    format. That format is called TAP, the Test Anything Protocol. It is
    defined in Test::Harness::TAP.
    ==============================

    So, are you sure you know what you're doing? Doesn't really sound like
    your tests *should* be outputting anything other than TAP formatted
    messages.

    If you were to keep reading, you would find:
    ==============================
    $Test::Harness::Verbose
    The package variable $Test::Harness::Verbose is exportable and can be
    used to let runtests() display the standard output of the script
    without altering the behavior otherwise. The prove utility's -v flag
    will set this.
    ===============================

    Did you try that?

    Paul Lalli
    Paul Lalli, Aug 7, 2006
    #2
    1. Advertising

  3. yusuf

    yusuf Guest

    Paul Lalli wrote:
    > yusuf wrote:
    >
    > > I was trying to use Test::Harness to gather output from my bash scripts
    > > as well, and I'm having problems with items being printed by the
    > > script.
    > >
    > > How do I get all stdout and stderr from the script to be just printed
    > > by the Test::Harness, rather than disappearing?

    >
    > In the past, you've been asked by several people - myself included - to
    > post a SHORT but COMPLETE script when you have difficulties. Why do
    > you continue to refuse to do that? Why do you continue to expect free
    > help without following even the most simple of requests?
    >
    > Additionally, please read the documentation for the module you are
    > using. In this case, perldoc Test::Harness shows:
    > ==============================
    > STOP! If all you want to do is write a test script, consider using
    > Test::Simple. Test::Harness is the module that reads the output from
    > Test::Simple, Test::More and other modules based on Test::Builder. You
    > don't need to know about Test::Harness to use those modules.
    >
    > Test::Harness runs tests and expects output from the test in a certain
    > format. That format is called TAP, the Test Anything Protocol. It is
    > defined in Test::Harness::TAP.
    > ==============================
    >
    > So, are you sure you know what you're doing? Doesn't really sound like
    > your tests *should* be outputting anything other than TAP formatted
    > messages.
    >
    > If you were to keep reading, you would find:
    > ==============================
    > $Test::Harness::Verbose
    > The package variable $Test::Harness::Verbose is exportable and can be
    > used to let runtests() display the standard output of the script
    > without altering the behavior otherwise. The prove utility's -v flag
    > will set this.
    > ===============================
    >


    Thanks for you help. I didn't post code, because this didn't seem to be
    a code issue. I'll do that next time.
    yusuf, Aug 7, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. fabbl

    Test Harness Strategies

    fabbl, Apr 17, 2004, in forum: VHDL
    Replies:
    1
    Views:
    1,039
    Jim Lewis
    Apr 17, 2004
  2. Todd
    Replies:
    0
    Views:
    312
  3. Troy Denkinger

    Test Harness?

    Troy Denkinger, Mar 9, 2006, in forum: Ruby
    Replies:
    10
    Views:
    227
    Troy Denkinger
    Mar 10, 2006
  4. yusuf

    Test::Harness and test values.

    yusuf, Aug 7, 2006, in forum: Perl Misc
    Replies:
    4
    Views:
    104
    yusuf
    Aug 9, 2006
  5. Test harness for scripts?

    , May 16, 2007, in forum: Perl Misc
    Replies:
    1
    Views:
    106
    Sisyphus
    May 17, 2007
Loading...

Share This Page