This is a large topic.
For the last two years I have designed frameworks for two clients. In
the last year alone I have redesinged a framework twice I think with
patterns in mind.
The first pattern I used was Adapter which was to put a buffer between
semantic naming of elements on the page and the physical DOM
elements.This Adapter way of thinking is what Page class I about for
me. Translate logical to physical (I see similar way of thinking in
Taza and Watircraft and Rasta)
The next patterns are Template and Builder. I base most of my test
scenarios on the mixture of those two. Builder patterns is great in
dealing with various configurations in UseCases where each scenario is
a composition of objects that give it whole.
Template is the type of patterns where I define the main test scenario
and I vary it according  to the needed  test conditions.
I also use Decorators a lot in a form of modules mixed into objects
that provide specialized just-in-time implementations. All of it give
it loose coupling and rapid ability to reconfigure tests because most
of my work I is exploratory testing so i need to configure test
conditions quickly to get to a place where I can introduce variance to
test a very specific test conditions.
I also use Strategy pattern but not too much, it's complicated for me.
too much work for ROI.

As a teser ROI is important. The most important I think.
I need to show to my client that I can do some test condition
preparation 'FAST' when it matters. It does not pay to have
'beautifule automated tests' or 'Clean automated tests' the payoff is
'running tests' They have to run and they have to be configured fast.
All else is 'window dressing' as I usually say.
ROI is important I think so I structure my tests this way.
Anyway, this is my two.to_i cents here sharing some thoughts.
Good weekend to all and don't forget the Rspec as a 'pattern' . it is
worth studying especially the matchers as a way of expressing
behavioral expectations and the sequential execution.

marekj

Watirloo: Semantic Page Objects in UseCases
http://github.com/marekj/watirloo/




On Fri, Apr 3, 2009 at 3:09 PM, Jim Knowlton <jknowlton...@gmail.com> wrote:
>
> I think the biggest thing alot of us Watir developers need is a good
> guide to design patterns with Watir.  I know for myself, I know the
> commands and basic syntax pretty well, and can design a test structure
> that works, but I'm sure there are things I'm doing that could be
> designed better (I'm a tester, after all, not a full-time
> programmer).  I'd love a guide that describes best practices for how
> to set up a directory structure, set up rake for common tasks, etc.
>
> I know WatirCraft attempts to address this to some extent, but I guess
> I'm suggesting that some people might need to design their own
> framework, but not know how to do it.
>
> My two cents.
>
> Jim
> >
>

--~--~---------~--~----~------------~-------~--~----~
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 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---

Reply via email to