Press Release: November 30, 2004
"Unit Test Frameworks": A Language-Independent Overview
Sebastopol, CA--According to author Paul Hamill, most people who write software have at least some experience with unit testing, even if they don't think of it that way. "If you have ever written a few lines of throwaway code just to try something out, you've built a unit test," says Hamill. "On the other end of the software spectrum, many large-scale applications have huge batteries of test cases that are repeatedly run and added to throughout the development process. Unit tests are useful at all levels of programming."
But what are unit tests and how are they run? In his new book Unit Test Frameworks (O'Reilly, US $29.95), Hamill covers the usage, philosophy, and architecture of unit test frameworks as he answers this question. He explains that unit test frameworks are software tools to support writing and running tests, including a foundation on which to build tests and the functionality to execute the tests and report their results. "They are not solely tools for testing," says Hamill. "They can also be used as development tools on a par with preprocessors and debuggers. Unit tests frameworks can contribute to almost every stage of software development, including software architecture and design, code implementation and debugging, performance optimization, and quality assurance."
Until now, there has been little documentation available on unit testing, and most sources addressed specific frameworks and specific languages, rather than explaining the use of unit testing as a language-independent, standalone development methodology. Hamill begins by having the reader build a simple unit test framework from the ground up. The xUnit architecture is presented, using the JUnit framework as the reference implementation of xUnit. Readers will progressively build an example application to demonstrate common practices and patterns of unit test development.
With step-by-step instruction in basic unit test development, Unit Test Frameworks provides useful code examples in both Java and C++, and includes details on some of the most commonly used frameworks today from the xUnit family, including JUnit for Java, CppUnit for C++, and NUnit for .NET. The book includes clear, concise, and detailed descriptions of:
The tutorials and example code included in Unit Test Frameworks are platform-independent and compatible with Windows, Mac OS X, Unix, and Linux. The book's companion CD includes complete versions of JUnit, CppUnit, NUnit, and XMLUnit, as well as the complete set of code examples.
- Chapter 3, "The xUnit Family of Unit Test Frameworks"
- For more information about the book, including table of contents, index, author bio, and samples
- A cover graphic in JPEG format
For almost 40 years, O’Reilly Media has provided technology and business training, knowledge, and insight to help companies succeed. Our unique network of experts and innovators share their knowledge and expertise through the company’s Safari training and learning platform and at O’Reilly conferences. As a SaaS learning platform, Safari delivers highly topical and comprehensive technology and business learning solutions to millions of users across enterprise, consumer, and university channels. For more information visit oreilly.com.
Return to: O'Reilly Press Room