The Artima Developer Community
Sponsored Link

Agile Buzz Forum
Designing Testable User Interfaces

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Dave Churchville

Posts: 164
Nickname: dchurchv
Registered: Feb, 2005

Dave Churchville is a 15 year software industry veteran in both development and management roles
Designing Testable User Interfaces Posted: Oct 9, 2005 11:51 AM
Reply to this message Reply

This post originated from an RSS feed registered with Agile Buzz by Dave Churchville.
Original Post: Designing Testable User Interfaces
Feed Title: Agile Project Planning
Feed URL: http://feeds2.feedburner.com/AgileProjectPlanning
Feed Description: Thoughts on agile project planning, Extreme programming, and other software development topics
Latest Agile Buzz Posts
Latest Agile Buzz Posts by Dave Churchville
Latest Posts From Agile Project Planning

Advertisement
One of the biggest challenges in software development is creating graphical user interfaces that are easy to test. For small teams especially, having the ability to automate tests that interact with the GUI can save a great deal of manual testing effort.

Conventional wisdom suggests that to test a GUI application, you should test below the interface itself, and design an application that has a very thin UI shell. But how would you test even a simple Scribble application that let you draw on the screen?

One approach would be to design the application to support scripting. In effect you create a protocol for the presentation layer than can be driven by automation. This is the approach that testing tools for Web applications take, since HTTP and HTML offer a well-defined protocol for both taking actions and rendering the results.

So for our Scribble application, we need to be able to draw on the screen, and test to see if what we drew actually appears. The protocol could be as simple as a way to plot a point, and a way to test if a point on the screen is plotted. And maybe a way to save and load the image.

- Plot point x, y
- Test point x, y
- Save as file
- Load file

With these simple primitives, we can now write automated acceptance tests for our Scribble application. We can test existing images to verify that what we know is in the file will be displayed properly in Scribble. We can draw to the edges and see if anything breaks. Most importantly, we can develop a suite of tests that can be run automatically whenever Scribble is updated in the future.

By thinking about how to design our user interfaces to be testable, we also allow them to be useful outside of their original intended purpose. Even our simple Scribble application could be controlled from a statistical package that doesn't have it's own drawing features to do some simple charting.

So make your user interfaces scriptable, and reap the benefits for testing now, and maybe something even more interesting later.


For more on agile tools and techniques: http://www.extremeplanner.com

Read: Designing Testable User Interfaces

Topic: All the way to T Previous Topic   Next Topic Topic: All the way to T

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use