Automated UI-based acceptance tests for web applications

The Stuttgarter Testtage took place on March 21th and 22th 2013.
I was giving a talk on March 21th about writing UI-based acceptance tests for web applications. Writing acceptance tests on the UI layer should be considered carefully as badly written UI tests are often hard to maintain. Nevertheless, sometimes UI tests are necessary in order to prove the required business functionality. To reduce the cost of maintenance significantly Page Objects can be used to encapsulate the underlying page source as they represent the services offered by a particular page or part of a page.

Executable Specification with Greenpepper
There are several tools for automating acceptance tests. Greenpepper provides a Confluence plugin for defining and running executable specifications using specification by examples. It allows business people, software development teams and testers to collaborate when writing and verifying examples that can be used for acceptance tests in order to test the business requirements.
Other tools use specifications written in simple text files or HTML and different format to express the examples. There was another interesting talk about Cucumber which in contrast to Greenpepper requires the examples to be written in a particular format.

Hands-on exercise at Stuttgarter Testtage
In the afternoon session the attendants had the opportunity to learn in hands-on exercises about the topics that were presented in the talks of the morning session.
Andreas Falk and I had prepared acceptance tests with Selenium that were automated using Concordion, another acceptance testing tool. The prepared tests were based on a DVD store where DVDs can be searched and put into a shopping cart ( the showcase application of inspectIt). Some of the tests passed whereas some tests failed. The task for the participant was to understand how Concordion was working and to get the failing tests pass.
Although, most of the participants didn’t have any experience with specification by examples and agile acceptance testing before, they were able writing specifications and test quite quickly. Most tools are really simple and have a relatively short learning curve which allows to start with acceptance testing quite quickly. In my opinion, the most challenging part when working with specification by example is to define the examples as they should be simple, easy to understand and should contain no irrelevant information.
The slides of my talk can be found at the Homepage of the Conference
Recent posts





