Kanglin Li and Mengqi Wu: Effective Software Test Automation.
Sybex, 2004, 0782143202, 408 pages.
One of the most important features of the "New Standard Model" of
programming is its emphasis on unit testing. Just five years after
the first version of JUnit was written, an ever-increasing number of
programmers actually create and run tests as a matter of course.
But writing tests by hand is still tedious, and still requires a fair
degree of programming skill. Enter Li and Wu's new book. Over the
course of twelve detailed (and sometimes rather intense) chapters, the
authors explain how to build a higher-level testing tool for .NET
reflection, to find and call the methods being tested;
CodeDOM, to generate testing code from specifications; and
Excel, as a user interface.
Using an application like Excel as a UI may sound strange to Unix
programmers, but thanks to its COM interface, programs can drive it,
and read data from it, with ease. Once QA staff have created a
spreadsheet full of tests, the tool described in this book reads in
their test cases, generates code to implement those tests, loads the
classes to be tested, and runs that code.
The testing tool by itself is interesting and useful, but what I
really enjoyed about this book was the authors' explanation of how to
build it. Flat text files and handwritten code will always be with
us, but structured data and machine-generated code are becoming more
important with every passing day. If you'd like a glimpse at how the
next generation is going to program, this book is a good place to
comments powered by Disqus