CARVIEW |
Unit Test Frameworks
Tools for High-Quality Software Development
- By
- Paul Hamill
- Publisher:
- O'Reilly Media
- Released:
- November 2004
- Pages:
- 216
This is the only book to explore unit testing as a language-independent, standalone development methodology. It covers the theory and methodology of unit test frameworks, offers instruction in unit test development, provides useful code examples in both Java and C++, and details the most commonly used frameworks from the XUnit family, including JUnit for Java, CppUnit for C++, and NUnit for .NET. It also includes the complete source code for CppUnit for C++ and NUnit for .NET.
Unit test frameworks are a key element of popular development methodologies such as eXtreme Programming (XP) and Agile Development. But unit testing has moved far beyond eXtreme Programming; it is now common in many different types of application development. Unit tests help ensure low-level code correctness, reduce software development cycle time, improve developer productivity, and produce more robust software.
Until now, there was 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. This invaluable new book covers the theory and background of unit test frameworks, offers step-by-step instruction in basic unit test development, 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.
Unit Test Frameworks includes clear, concise, and detailed descriptions of:
- The theory and design of unit test frameworks
- Examples of unit tests and frameworks
- Different types of unit tests
- Popular unit test frameworks
- And more
-
Chapter 1 Unit Test Frameworks: An Overview
-
Test Driven Development
-
Unit Testing and Quality Assurance
-
Homegrown Unit Testing
-
-
Chapter 2 Getting Started: Tutorial
-
Outline of an Application: the Virtual Library
-
Example 1: Create a Book
-
Example 2: Create a Library
-
-
Chapter 3 The xUnit Family of Unit Test Frameworks
-
xUnit Family Members
-
xUnit Extensions
-
The xUnit Architecture
-
xUnit Architecture Summary
-
-
Chapter 4 Writing Unit Tests
-
Types of Asserts
-
Defining Custom Asserts
-
Single Condition Tests
-
Testing Expected Errors
-
(Not) Testing Get/Set Methods
-
Testing Protected Behavior
-
Test Code Organization
-
Mock Objects
-
AbstractTest
-
Performance Tests
-
New Library and Book Code
-
-
Chapter 5 Unit Testing GUI Applications
-
Library GUI
-
-
Chapter 6 JUnit
-
Overview
-
Architecture
-
Usage
-
Test Assert Methods
-
-
Chapter 7 CppUnit
-
Overview
-
Architecture
-
Usage
-
Test Assert Methods
-
-
Chapter 8 NUnit
-
Overview
-
Architecture
-
Usage
-
Test Assert Methods
-
-
Chapter 9 PyUnit
-
Overview
-
Architecture
-
Usage
-
Test Assert Methods
-
-
Chapter 10 XMLUnit
-
Overview
-
Architecture
-
Usage
-
Test Assert Methods
-
-
Chapter 11 Resources
-
Web Sites
-
Discussion Groups
-
Books
-
-
Appendix A Simple C++ Unit Test Framework
-
Example 1: Create a Book
-
Example 2: Create a Library
-
-
Appendix B JUnit Class Reference
-
Appendix C CppUnit Class Reference
-
Colophon

- Title:
- Unit Test Frameworks
- By:
- Paul Hamill
- Publisher:
- O'Reilly Media
- Formats:
-
- Ebook
- Safari Books Online
- Print Release:
- November 2004
- Ebook Release:
- February 2009
- Pages:
- 216
- Print ISBN:
- 978-0-596-00689-1
- | ISBN 10:
- 0-596-00689-6
- Ebook ISBN:
- 978-0-596-10482-5
- | ISBN 10:
- 0-596-10482-0
-
Paul Hamill
Paul Hamill is a highly experienced software developer with more than ten years of experience developing code using C/C++, Java, and other languages. He has a BS ME from Cornell University and an MS EE from the University of Colorado, and is the published co-author of several academic papers on advanced CAD software. His recent experience includes work on a number of small entrepreneurial software development teams relying on eXtreme Programming (XP) and unit testing methodologies.
Our look is the result of reader comments, our own experimentation, and feedback from distribution channels. Distinctive covers complement our distinctive approach to technical topics, breathing personality and life into potentially dry subjects. The animal on the cover of Unit Test Frameworks is a Norway rat. Contrary to its name, the Norway rat's origins are in Asia; over the centuries, it has spread throughout the world. It is often blamed for transmitting the Black Plague through Europe, but another species, the black rat, is actually responsible for this. The Norway rat's appearance includes a brown or dark gray coat with a white or grayish underside, pointed ears, a long snout, and a scaly tail. It averages about 9 to 10 inches in length. It builds its own nest of twigs and leaves and is mostly nocturnal. It makes its habitat where food is most accessible and is typically found in cities, where it can root through garbage; near farms where it can forage through the harvest; and near the ocean, where it can eat fish, seaweed, and the like. It lives among large groups of other rats, usually with one male designated as the leader.
Along with the common house mouse, the Norway rat is the most popular animal model for scientific lab testing. (The lab rats are usually albino, however.) It is useful because its metabolism is very much like a human's and the rats often are affected by the same diseases and sicknesses as humans. Mary Brady was the production editor and the copyeditor for Unit Test Frameworks. Colleen Gorman proofread the book. Matt Hutchinson and Claire Cloutier provided quality control. Ellen Troutman-Zaig wrote the index.
Ellie Volckhausen designed the cover of this book, based on a series design by Edie Freedman. The cover image is a 19th-century engraving from the Dover Pictorial Archive. Clay Fernald produced the cover layout with QuarkXPress 4.1 using Adobe's ITC Garamond font. David Futato designed and produced the CD label using Adobe InDesign CS.
Melanie Wang designed the interior layout, based on a series design by David Futato. This book was converted by Julie Hawks to FrameMaker 5.5.6 with a format conversion tool created by Erik Ray, Jason McIntosh, Neil Walls, and Mike Sierra that uses Perl and XML technologies. The text font is Linotype Birka; the heading font is Adobe Myriad Condensed; and the code font is LucasFont's TheSans Mono Condensed. The illustrations that appear in the book were produced by Robert Romano and Jessamyn Read using Macromedia FreeHand MX and Adobe Photoshop CS. This colophon was written by Mary Brady.
![]() ©2010, O'Reilly Media, Inc. (707) 827-7000 / (800) 998-9938 All trademarks and registered trademarks appearing on oreilly.com are the property of their respective owners. |
About O'Reilly
Academic Solutions Authors Contacts Customer Service Jobs Newsletters O'Reilly Labs Press Room Privacy Policy RSS Feeds Terms of Service User Groups Writing for O'Reilly |
Content Archive Business Technology Computer Technology Microsoft Mobile Network Operating System Digital Photography Programming Software Web Web Design |
More O'Reilly Sites
O'Reilly Radar Ignite Tools of Change for Publishing Digital Media Inside iPhone makezine.com craftzine.com hackszine.com perl.com xml.com Partner Sites InsideRIA java.net O'Reilly Insights on Forbes.com |