Dan Wellman's Blog

Automated Testing Tips from the Google Wave Team (on Google Web Toolkit)

Adam Schuck of the Google Wave team spoke at Google I/O 2009 about building the Wave client using Google Web Toolkit (GWT).  You can watch a video of the presentation online: Google Wave: Powered by GWT. The Google Wave client is a great demonstration of what's possible with GWT -- and what's coming in GWT 2.0.

One of Adam's key points was that automated testing is crucial to the project's success.  You can watch this section of the presentation starting at around 46:30.

Slide from One of Adam's slides lists the Wave team's testing strategies:

  1. Use the Model View Presenter pattern to build testable client code.  This pattern decouples widget code from user interface logic. 
  2. Prefer JUnit test cases over GWTTestCases, since JUnit test cases run a few orders of magnitude faster than GWTTestCases.  This means developers will be more likely to run the tests frequently.
  3. Use an end-to-end browser testing tool like WebDriver to verify the whole system.  Adam emphasized making these tests as clear and readable as possible so that other developers can understand their intent.

If you'd like to learn more about testing GWT applications, here are some articles I've written on the subject:

Paul Infield-Harm and I will be presenting "Agile AJAX: The Google Web Toolkit Experience" at the Agile 2009 conference in Chicago, IL, where we'll demonstrate how to use GWT to build and test applications in an Agile process.