[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

How to write in a Text file

Hasmukh K P

6/3/2005 4:48:00 AM

I am very new to Ruby. I have written some test case for my Web
application. I need to log the information of my Testcase results in
Text file.
I tried Log, but couldn't succeed.
Can anyone tell me, how can I do this !!

Hasmukh



1 Answer

Dave Burt

6/3/2005 5:12:00 AM

0

"Hasmukh K P" <hasmukh@aalayance.com> asked...
>I am very new to Ruby. I have written some test case for my Web
>application. I need to log the information of my Testcase results in Text
>file.
> I tried Log, but couldn't succeed.
> Can anyone tell me, how can I do this !!

That depends on what test framework you are using. Most should have logging
capability of some sort. If they just output to STDOUT, you can redirect
that output to a file from your shell, probably something like this:

run_tests.rb > log_file.txt

Also, if you are doing web testing and haven't seen Watir, you should check
it out. Here's a nice document walking through a basic test:

http://www.kohl.ca/articles/watir...

And here's Watir:

http://wtr.ruby...

Cheers,
Dave