HTML and CSS Reference
I n the previous three chapters we have seen how automated tests can help improve
quality of code, guide design and drive development. In this chapter we will use
automated tests to learn. As small executable code examples, unit tests make a
perfect learning resource. Isolating a specific aspect of an interface in a unit test is a
great way to learn more about how it behaves. Other types of automated tests can
help our understanding of both the language and specific problems. Benchmarks
are a valuable tool to measure relative performance, and can guide decisions about
how to solve a specific problem.
behavior of some object, is fairly simple. Most modern browsers ship with a console
command line interfaces when the browser environment is not of particular interest.
Although this sort of one-off coding session can help our understanding of an inter-
face, it suffers from the same problems that manual application testing does. There
is no way to repeat a given experiment, there is no record of previously run experi-
ments, and there is no simple way of repeating an experiment in multiple browsers.
In Chapter 1, Automated Testing, we introduced unit tests as a means to solve
the problems brought on by manual testing. Surely, unit tests can help us solve