you can use 'tee' program. It's part of cygwin distribution if you have that installed. <br>it can capture everything from the stdout to a file if you pipe it from the command line. <br>So when you run a test append "| tee
somefile.txt" to dump your stream in there.<br>like so..<br>prompt>ts_mysuite.rb | tee -a test_reports.txt<br><br><a href="http://www.ss64.com/bash/tee.html">http://www.ss64.com/bash/tee.html</a><br><br><br><div><span class="gmail_quote">
On 7/6/07, <b class="gmail_sendername">Tiffany Fodor</b> <<a href="mailto:forum-watir-users@openqa.org">forum-watir-users@openqa.org</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi all!<br><br>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.
<br><br>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.<br><br>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".
<br><br>Any suggestions would be appreciated!<br><br>Thanks!<br><br>-Tiffany<br>_______________________________________________<br>Wtr-general mailing list<br><a href="mailto:Wtr-general@rubyforge.org">Wtr-general@rubyforge.org
</a><br><a href="http://rubyforge.org/mailman/listinfo/wtr-general">http://rubyforge.org/mailman/listinfo/wtr-general</a><br></blockquote></div><br>