Why you should use Watai
========================

Intended users
--------------

Watai is a tool for [Front-End Ops](http://www.smashingmagazine.com/2013/06/11/front-end-ops/).

It provides developers with a way to quickly automate interaction with websites and web applications and check whether these interactions present the expected information to the end users.

This allows to automate demonstration of features, to detect regressions when updating code. And, most importantly, since the same tests can be run in almost any browser*, any website or webapp can easily check cross-browser functional support.

_* any browser supported by WebDriver, i.e. practically [all browsers](http://seleniumhq.org/about/platforms.html)_


Strengths
---------

- Enforcement of a highly decoupled, [component](http://addyosmani.com/blog/the-webs-declarative-composable-future/)-based architecture for maintainable tests.
- Ability to do black-box testing of web components.
- Simple cascading configuration makes sharing tests across environments very easy.
- Out-of-the-box support for async operations (AJAX…), as well as much more resilience than WebDriver, whose failures are wrapped.
- Aiming for helpful error messages.
- Aiming for high quality developer documentation, so that you can _actually_ fix things or add functionality without depending on the original developer.


Limitations
-----------

Watai, like any **integration-level** testing framework, can not be considered a proper testing strategy alone.

You should have unit tests for your application, both on the server- and on the client-side. If your application is complex, adding functional-level tests is a good thing.

Integration-level testing validates _scenarios_, expected behavior, but cannot help in pinpointing a failure origin as much as unit testing can.
Moreover, even though Watai does its best to ease writing and maintaining such high-level tests, since they run across so many components, they will always require more effort than the kind of direct code access unit tests provide. They also can also catch bugs you wouldn't have been able to find otherwise, though.

Watai has the same limitations as any other integration-level testing tool: it has to be used at the proper stage, and to validate reasonably complex behavior to add value. Remember that [testing is a path](http://stevenjackson.github.io/2014/01/26/tdd-is-a-path/) and integration testing is part of the paving.
