you can use 'tee' program. It's part of cygwin distribution if you have that
installed.
it can capture everything from the stdout to a file if you pipe it from the
command line.
So when you run a test append "| tee somefile.txt" to dump your stream in
there.
like so..
prompt>ts_mysuite.rb | tee -a test_reports.txt

http://www.ss64.com/bash/tee.html


On 7/6/07, Tiffany Fodor <[EMAIL PROTECTED]> wrote:

Hi all!

I'm trying to determine the best way to collect the results of my
tests.  I'm using Test::Unit methods for my harness and will have about
15-20 data-driven tests that get information from an excel spreadsheet for
use in each test.

I have lots of 'verify' statements that check various conditions and post
messages for failed conditions as well as progress statements I generate
with simple 'puts' commands.

Ideally, I'd like all of the results ('puts' statements as well as the
Test::Unit results) to be echoed to the command prompt and copied to a log
file. I can't find a good way to do this other than copy/paste.  I could
write any 'puts' statements to a file as well as the command prompt, but I'm
not sure how to capture the Test::Unit results.  I did a web search and the
only real answer I found on capturing command line output with Ruby was
"don't".

Any suggestions would be appreciated!

Thanks!

-Tiffany
_______________________________________________
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

_______________________________________________
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to