Automated tests are undeniable extremely important, preferably executed in an continuous integration environment. We can divide them in 3 major kinds: unit tests, integration tests and GUI tests.
Unit tests test small pieces of code, i.e. methods, classes. Integration tests test the interactions between different classes like they would used in a deployed application. GUI tests test the user interactions.
The Webdriver framework provides a Java API on the Selenium framework. It works quite nice!
The problem I sometimes see with webdriver tests is that they are used as integration tests which makes them much slower than needed. E.g. you don’t have to verify validations in your webdriver tests, do it in the unit tests. You don’t have to verify that your data is retrieved from the DB, you have integration tests for that. When your unit tests cover your dao’s, your services & your controllers and you have integration tests chaining all your layers, then there’s absolutely no need for testing business logic at the GUI level.
Mock your controller objects to your needs and your webdriver tests will look much simpler and run much much faster!