Newsletter sign-up
View all newsletters

Enterprise Java Newsletter
Stay up to date on the latest tutorials and Java community news posted on JavaWorld

Sponsored Links

Optimize with a SATA RAID Storage Solution
Range of capacities as low as $1250 per TB. Ideal if you currently rely on servers/disks/JBODs

Acceptance test driven development for web applications

ATDD is a simple process change that can have far-reaching implications for your development projects.

  • Print
  • Feedback

Page 5 of 5

The Page Objects pattern, well supported by Selenium 2/WebDriver in particular, is an excellent choice for ATDD tests. High-level acceptance criteria need to be expressed in high-level business terms (the "what"), and then implemented under the hood using a set of well-structured, maintainable page objects. For example, an automated acceptance test will be expressed in business terms, and implemented as a series of steps. Each step will make use of page objects to interact with the web application. These levels of abstraction make the acceptance tests considerably more stable and maintainable.

In conclusion

Defining and automating your acceptance criteria up front makes a lot of sense. Not only does it provide clear goals for developers, it also gives excellent visibility into what feature are being implemented, how they will work, and how the project as a whole is progressing. And, as a bonus, ATDD will also provide you with a broad set of regression tests.

Many open source tools exist to help you implement an ATDD strategy in your project -- see Resources for a listing of the ones discussed in this article. While you can use conventional unit testing tools for ATDD, dedicated ATDD tools provide a stronger emphasis on communication and reporting, which are key parts of the ATDD approach. And for web applications, automated testing tools based on the Page Objects pattern are an excellent choice when it comes to implementing the tests themselves.

About the author

John Ferguson Smart is an experienced consultant specialising in enterprise Java, web development, and open source technologies, currently based in Wellington, New Zealand. Well known in the Java community for his many published articles, and as author of Java Power Tools, John helps organisations to optimize their Java development processes and infrastructures and provides training and mentoring in open source technologies, SDLC tools, and agile development processes.

Read more about Tools & Methods in JavaWorld's Tools & Methods section.

  • Print
  • Feedback

Resources

Tools discussed in this article

More from JavaWorld

  • See the JavaWorld Site Map for a complete listing of research centers focused on client-side, enterprise, and core Java development tools and topics.
  • JavaWorld's Java Technology Insider is a podcast series that lets you learn from Java technology experts on your way to work.