O'Reilly logo

Extreme Programming Installed by Chet Hendrickson, Ann Anderson, Ron Jeffries

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Conclusions

We've completed development of our user interface. Not every aspect of a GUI can be unit-tested through the approach we've used, but we've identified a number of useful techniques:

  • Even GUI development can maintain the cycle-in-the-small of test-code design.

  • GUI tests can be robust against changes in how the widgets are arranged on-screen.

  • Fields and buttons can be simulated with getText(), setText(), doClick(), and so on.

  • Stub out the services provided by the model to get fine-grained control over what the GUI test shows.

  • We can test relative positioning using getLocationOnScreen().

Unit tests can be tedious to write, but they save you time in the future (by catching bugs after changes). Less obvious, but just as important, is that they ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required