
53
Usability Tests
Usability tests verify “fi tness for purpose” by confi rming that real users can use
the software application to achieve the stated goals. These tests are very diffi cult
to automate because they require subjective assessment by people regarding how
easy it is to use the SUT. For this reason, usability tests are rarely automated and
will not be discussed further in this book.
Exploratory Testing
Exploratory testing is a way to determine whether the product is self-consistent.
The testers use the product, observe how it behaves, form hypotheses, design
tests to verify those hypotheses, and exercise the product with them. By its very
nature, exploratory testing cannot be automated, although automated tests can
be used to set up the SUT in preparation for doing exploratory testing.
Which Tools Do We Use to Automate Which Tests?
Choosing the right tool for the job is as important as having good skills with the
tools selected for use. A wide array of tools are available in the marketplace, and
it is easy to be seduced by the features of a particular tool. The choice of tool is
a strategic decision: Once we have invested a lot of time and effort in learning a
tool and automating many tests using that tool, it becomes much more diffi cult
to change to a different tool.
There are two fundamentally different approaches to automating tests
(Figure 6.2). The Recorded Test (page 278) approach involves the use of tools
that monitor our interactions with the SUT while we test it manually. This
information is then saved to a fi le or database and becomes the script for re-
playing this test against another (or even the same) version of the SUT. The
main problem with Recorded Tests is the level of granularity they record. Most
commercial tools record actions at the user interface (UI) element level, which
results in Fragile Tests (page 239).
The second approach to automating tests, Hand-Scripted Tests (see Scripted
Test on page 285), involves the hand-coding of test programs (“scripts”) that ex-
ercise the system. While xUnit is probably the most commonly used Test
Automation Framework for preparing Hand-Scripted Tests, they may be pre-
pared in other ways, including “batch” fi les, macro languages, and commercial or
open-source test tools. Some of the better-known open-source tools for preparing
Scripted Tests are Watir (test scripts coded in Ruby and run inside Internet Ex-
plorer), Canoo WebTest (tests scripted in XML and run using the WebTest tool),
Which Tools Do We Use to Automate Which Tests?