Skip to content

Script your UI tests like a power user

December 24, 2012

Power users know all the shortcuts in an application, they’re never more than a few clicks away from what they want. They keep their hands on they keyboard. User interface tests, on the other hand, tend to click their way through an application, following the main routes.  When practicing BDD, it is important to write tests for these main routes, but it is also important to script the majority of the tests like a power user or you’ll wind up with slow running tests, and worse, applications that do not reward expertise.

Web application tests can be accelerated by streamlining workflows, and by improving navigation around the site.  The main speed loss in Web application testing is navigation between pages, particularly when tests are written to run in isolation.

Windows CodedUI tests lose most of their time searching for controls on complex applications.  Allowing applications to be navigated using keyboard shortcuts can dramatically reduce the run time for tests.

Applications on any platform should allow values to be typed into combo boxes and date selectors.  Tab index should be properly configured.  It should be possible to complete forms quickly with the keyboard.

When UI tests are running slow, look at the underlying code, but also look at the usability of the application.  Slow running tests may indicate a usability problem.  Improving the navigation of the application will speed up your tests, and make your users happy.

From → Testability, Testing

Leave a Comment

Leave a comment