You can try creating a method that logs to a file aswell as to the console.
It'll look something like this
 
def log(message)

    @file << message

    puts message    


end

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Charley Baker
Sent: Wednesday, March 28, 2007 11:46 AM
To: wtr-general@rubyforge.org
Subject: Re: [Wtr-general] How to get report message after running
everytestcase


There might be a way to redirect both to console and file, search google for
redirect dos output. I know how to do it in unix, but not sure how to do it
in dos. You might also want to look at ci_reporter (available on rubyforge),
log4r or some other mechanism to log your test runs. 

-Charley


On 3/27/07, Jason He < [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> > wrote: 

Thanks for your reply.

 

But there will no message output in the console.

Could it output to both console and file?

 

Regards,

Jason


  _____  


From: [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>  [mailto:
<mailto:[EMAIL PROTECTED]>
[EMAIL PROTECTED] On Behalf Of Charley Baker
Sent: 2007年 3月27 日 22:50
To: wtr-general@rubyforge.org <mailto:wtr-general@rubyforge.org> 
Subject: Re: [Wtr-general] How to get report message after running everytest
case

 

You can redirect the output of your bat file to a file: 
mybat.bat > results.txt 

-Charley

On 3/27/07, Jason He <  <mailto:[EMAIL PROTECTED]>
[EMAIL PROTECTED]> wrote:

Dear all,

 

I write some the filename of test cases in a windows bat file, execute the
bat file, and then report messages for each test case will output in the
console.

Now, in order to make statistics for these messages, could they also output
to the log file by script? 

 

 

The following is the report message after running one test case

----------------------------------------------------------------------------
-------- 

Finished in 15.063 seconds.

 

  1) Failure:

test_b(TC_rt_r_login) [C:/watir1145/runtime/rt_r_login.rb:34]:

<false> is not true.

 

5 tests, 4 assertions, 1 failures, 0 errors

----------------------------------------------------------------------------
-------- 

 

Regards,

Jason


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

 


_______________________________________________
Wtr-general mailing list
Wtr-general@rubyforge.org <mailto:Wtr-general@rubyforge.org> 
http://rubyforge.org/mailman/listinfo/wtr-general
<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