Agile drives frequent releases and frequent releases drive automated testing. You can't just switch on test automation though, there is a lot of investment in time and energy required and the payoff is usually in the medium to long term.
So far we have built a simple Spring MVC web application and added a Cucumber based acceptance test. The next step is to add in a Selenium based Cucumber acceptance test. First we add in some Cucumber scenarios. Here is the feature file:
With the basic application in place it is now time to focus on testing. First up we add a Cucumber acceptance test. It is a good idea to keep your acceptance tests separate from your unit tests, so I tend to run them in the integration-test phase of Maven. To do this use the failsafe plugin, adding something like this to your pom: