Fork me on GitHub

Sunday, February 22, 2009

Watir, Is it good or just good enough?

Update - Added a few more points and links

When I was going through a few things to find some info, I found a lightning talk by Alister Scot about Watir at AWTA. The concluding thoughts struck me and made me think for quite sometime. It read "Should Watir be really good at a few things (IE, Firefox testing) or just good enough at a lot of things (IE, Firefox, Chrome, Opera, Safari...)?". Interesting point...

As an active Watir user and author of ChromeWatir, I would like to present my point of view on this subject. A lot of people will already be knowing this but I just wanted to write something about this for sometime and this point has given me this opportunity.

I feel that Watir has seen a huge paradigm shift especially in the last year. My thinking is, it has shifted from being a test driver implementation to an API to which individual drivers conform to. If you see my slides on Watir, please take a look at the slide Watir Architecture. In there I have separated the Watir API and the individual implementations.

There are several advantages for this approach. One is for the end user he needs to learn only one API to write test for any browser. As well it will be possible to switch the browser he is testing by changing the implementation. But a bigger advantage for the Watir developers is individual implementations are being done by seperate teams. So even though Watir supports different browsers, there will be individual teams which will be responsible for developing as well as maintaining them.

Keeping the interface separate is really important for this. The implementations need not be merged. This will help in delegating the responsibility to individual teams. In future we have have even more implementations but there will always be people who know about the implementation to take care of these. So if we take this point of view into consideration, I think we don't need to care about Watir being just good enough. Watir will always be good.

Well talking all the green and lush things is good. But I like to think on both the sides of the problem. The problems I see in this approach are except for the mainline IE implementation, all other Watir implementations seem to be young and some differences from the original one. It may take sometime for them to stabilize and get on the same platform as the original implementation which is understandable.
As well getting disparate teams to work together may be difficult as they will have a different way of working. There is no ready made solution to this but I would love to know your thoughts on this.

Let me know your thoughts about this?

5 comments:

Bret said...

I agree with your comments. Few people realize that Watir's current unit tests can actually be run against any implementation. The next step will be to make this easier for people to do, to give us a way to measure compatibility.

Simon Stewart said...

It's what I've been doing with webdriver --- the interface has always been separate from the implementation.

Sai Venkatakrishnan said...

Yes Simon. Webdriver has been designed from the start for that. But in Watir's case it is a kind of extracted interface. As well each implementation is from a different maintainer.

So the post I wrote was more to do with the social structure of Watir maintainers and users working together in such a setting than the relation with the interface separation with implementation (which should always be the case :))

Regards,
Sai

Bret said...

We have plans to use webdriver in future versions of Watir.

Sai Venkatakrishnan said...

Bret,
I am not able to get this point. You mean building abstraction for WebDriver in JRuby with Watir as API?

Regards,
Sai