Hi, I've build a simple framework around TestObject modelling at one
company.
I am in the middle of specifying and building something like that again.
It's much easier second time around.
What I've found out is that it is useful to model Business Domain Objects
with Ruby classes by building some kind of Adapters or facade type pattersn
and wire them up to talk to Watir code
So for example if a Page has a Query TestObject that has 3 attributes
:street, :city, :zip and you can invoke a search with those attributes I
would model it like this:
class Query < TestObject
 def set_city end
 def set_street end
 def set_zip end
 def search end
end

Now I can write many tests by flooding the TestObject with query
configurations and searching them.
my data model comes first
query=[:city, 'Seattle', :street, 'Stoneway', :zip, '99999']


q = Query.new
q.set_city(query[:city])
q.set_street(query[:zip])
q.set_zip(query[:zip])
q.search

... then capture search results and do some asserts.
By making a Facade using Domain Model vocabulary I can then wire Watir code
in it.

def set_city(v)
 $ie.text_edit(:name, "city_str").set(v)
end

Watir implementation is encapusalted.
The tests can be written by anyone who interacts with Domain Model objects.
the watir code si written later.
Is this something you have in mind?
marekj


On 7/12/07, Pallavi <[EMAIL PROTECTED]> wrote:


Hi


First all let me have the privilege of starting the very first
discussion here at Google groups :).  i am working with Crestech
Software Systems and we are trying to build a keyword driven framework
around Watir.

I am trying to write a function to create an Object repository.. I
need some feedback from the group memebers, any advices, experiences,
suggestions regarding this issue are more then welcome and looking
forward for some divine interventions.



Thanks

Regards,

---
Pallavi
Crestech Software Systems.

_______________________________________________
Wtr-general mailing list
Wtr-general@rubyforge.org
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