I use to kinds of logs in my test:
1. In all my self created classes and methods I use puts statements to
output the test case flow to the command window. This is for myself to
investigate quckly when something goes wrong.
2. I have a self created report class which creates nice html reports
with screenshots of every test case. This is for official reporting in
my QA team.

On Nov 13, 6:55 pm, marekj <[EMAIL PROTECTED]> wrote:
> I have not needed logger for watir internal methods.
> However I do use logger for my tests using Logger class in Ruby for some
> test noise generation
> Here is a hacked up example which is sufficient for my needs.
> here is a gist:http://gist.github.com/3466
>
> my two.to_a cents
>
> --
> marekj | i can has watir frameworkhttp://www.bitbucket.org/marekj/watirloo/
> Semantic Page Objects Modeling in Watir
>
> On Thu, Nov 13, 2008 at 10:40 AM, Bret Pettichord <[EMAIL PROTECTED]>wrote:
>
>
>
> > I agree that it would be great if we had a way to log all of the watir
> > driver actions. I've thought about doing this for years but have never
> > really had the need for it, and it is non-trivial to implement (although
> > the refactoring i've done shouldn't make this any harder to do).
>
> > If Alister's question is whether people would like to have this level of
> > logging embedded in Watir, then I think that is a fair question, and my
> > guess would be that the answer would be yes.
>
> > Another question would be who wants to do it? Not simple.
>
> > Bret
>
> > Paul Rogers wrote:
> > > when I put the original logger in to watir, I really only intended it
> > > to get overwritten by a plugged in logger, but this unfortunately
> > > caused a lot of confusion. Probably cos the way I implemented it wasnt
> > > the best.
> > > A common thing is for people to want to log that they are clicking a
> > > certain link ( or button etc ), so its definitely useful for the main
> > > watir methods to be able to log this info, but with the merge and
> > > refactoring that Bret has been doing it may be much harder to do.
>
> > > So, what Im really saying is that its nice for the Watir browser
> > > drivers to be able to log their  actions, but shouldnt force users to
> > > use that mechanism completely.
>
> > > Paul
>
> > > On Thu, Nov 13, 2008 at 8:50 AM, Bret Pettichord <[EMAIL PROTECTED]
> > > <mailto:[EMAIL PROTECTED]>> wrote:
>
> > >     I think you've misunderstood some comments that I made.
>
> > >     Someone pointed out that the WatirLogger was in Watir but not in
> > >     FireWatir. In response, I suggest that instead of putting it in
> > >     both, we
> > >     remove it. Here is the code in question:
>
> > >      class WatirLogger < Logger
> > >        def initialize(filName, logsToKeep, maxLogSize)
> > >          super(filName, logsToKeep, maxLogSize)
> > >          self.level = Logger::DEBUG
> > >          self.datetime_format = "%d-%b-%Y %H:%M:%S"
> > >          self.debug("Watir starting")
> > >        end
> > >      end
>
> > >     My point was that it is vestigial. The Watir browser drivers don't
> > >     use it.
>
> > >     My view is that this should be treated as example framework code,
> > >     not as
> > >     part of Watir. To me, this is just an example of how to use the
> > Logger
> > >     class and in fact obscures the fact that it is really a fully
> > featured
> > >     logger by making you think it is a special Watir logger.
>
> > >     I agree that logging is an important part of a testing framework. But
> > >     Watir isn't a framework. It is just a browser driver.
>
> > >     Can you clarify what you mean by "a generic logger embedded in
> > Watir"?
> > >     To me what we have right now is "a generic logger embedded in Ruby
> > >     that
> > >     is made to look like it is part of Watir but really isn't".  Are you
> > >     suggesting that you'd like to see it truly embedded in Watir?
>
> > >     I do think there is a need for a standard testing framework for Watir
> > >     that includes logging. But i see that as a completely different
> > >     question.
>
> > >     Bret
>
> > >     Alister Scott wrote:
> > >     > There has been some discussion lately about whether to continue to
> > >     > include any logging functionality in the Watir library.
>
> > >     > I understand that it's not really a core part of Watir
> > >     functionality,
> > >     > but IMO I believe it may be useful to Watir users.
>
> > >     > If you were new to Watir and you compared it to commercial
> > offerings
> > >     > (QTP/WR/RFT etc.), then you would quickly find that all the
> > >     commercial
> > >     > tools have a logger in built.
>
> > >     > If a newbie picked up Watir if would be nice if they could just
> > turn
> > >     > logging on (or off).
>
> > >     > I am interested in the thoughts of the community surrounding the
> > >     > usefulness of a generic logger embedded in Watir.
>
> > >     > Cheers,
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---

Reply via email to