Unit Test Frameworks and over one million other books are available for Amazon Kindle. Learn more

Kindle Edition
 
   
Sell Back Your Copy
For a $2.10 Gift Card
Trade in
Have one to sell? Sell yours here
Unit Test Frameworks
 
 
Start reading Unit Test Frameworks on your Kindle in under a minute.

Don't have a Kindle? Get your Kindle here, or download a FREE Kindle Reading App.

Unit Test Frameworks [Paperback]

Paul Hamill (Author)
4.1 out of 5 stars  See all reviews (11 customer reviews)


Available from these sellers.


Textbook Student FREE Two-Day Shipping for Students. Learn more

Formats

Amazon Price New from Used from
Kindle Edition $14.35  
Paperback --  
Like this book? Find similar titles from O'Reilly and Partners in our O'Reilly Bookstore.

Book Description

0596006896 978-0596006891 October 2004

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
It also includes the complete source code for CppUnit for C++, and NUnit for .NET.


Editorial Reviews

About the Author

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.


Product Details

  • Paperback: 304 pages
  • Publisher: O'Reilly Media (October 2004)
  • Language: English
  • ISBN-10: 0596006896
  • ISBN-13: 978-0596006891
  • Product Dimensions: 9.2 x 7.1 x 0.6 inches
  • Shipping Weight: 13.6 ounces
  • Average Customer Review: 4.1 out of 5 stars  See all reviews (11 customer reviews)
  • Amazon Best Sellers Rank: #1,094,798 in Books (See Top 100 in Books)

More About the Author

Discover books, learn about writers, read author blogs, and more.

 

Customer Reviews

11 Reviews
5 star:
 (4)
4 star:
 (4)
3 star:
 (3)
2 star:    (0)
1 star:    (0)
 
 
 
 
 
Average Customer Review
4.1 out of 5 stars (11 customer reviews)
 
 
 
 
Share your thoughts with other customers:
Most Helpful Customer Reviews

15 of 15 people found the following review helpful:
4.0 out of 5 stars Great intro and overview if that's what you're looking for, October 26, 2005
By 
Lasse Koskela (Helsinki, Finland) - See all my reviews
(REAL NAME)   
This review is from: Unit Test Frameworks (Paperback)
I had used JUnit for several years before picking up this book and I like to think that I know the tool pretty well. So why did I decide to read this book? I read this book because I thought that might help me venture a bit outside my familiar JUnit turf and into doing test-first programming with languages other than Java. The short version? A very nice introduction to all the included xUnit ports. The long version? Read on.

The first four chapters are general introduction to the topic of unit testing (and to some degree, test-driven development). I was prepared to do a quick scan through them all but ended up reading chapters 3 (xUnit architecture) and 4 (writing unit tests) almost word to word-the topic was mostly familiar but the authors solid writing kind of kept me going.

The first two chapters didn't pique my interest that much, perhaps because I had already seen people develop a unit test framework from scratch as an introduction to the domain.

The real meat of the book that I was looking forward to was in chapters 7 through 9, the introductions to CppUnit, NUnit, PyUnit-which were mostly new to me although I had done very little fooling around with them before. I wasn't disappointed. The author managed to put together a pretty good set of tutorials for these frameworks. Obviously the same information is available online but I still prefer reading a treekiller rather than a printout of a web page.

The not so bright spots in the book, in my opinion, were the chapters on unit testing a Swing GUI and on XMLUnit. Not that they were in anyway badly written. I just felt like they didn't belong. I would've personally swapped in a couple of additional xUnit ports instead (Ruby and PHP, for example).

This is definitely not a book you'll carry with you from project to project. There's approximately 100 pages of substance split among half a dozen topics so none of them gets covered in detail. The rest, almost 100 pages of the book is what I'd classify as "nice to have"-I don't mind having that material in the book but I also wouldn't have minded if they'd left them out.

To summarize, if you'd like to get an idea of how the unit testing frameworks on different platforms/languages differ and what they have in common, this is as good an introduction to them as any and well written in all dimensions. However, you might be disappointed if you're looking for a more long-lasting companion.
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


12 of 12 people found the following review helpful:
3.0 out of 5 stars Good, but needs to cover more implementations..., November 12, 2004
By 
This review is from: Unit Test Frameworks (Paperback)
JUnit caused a major shift in the way people thougth about development. While the basic framwork was originally developed with Smalltalk, JUnit is what started the Unit Test Framework "revolution". This book explores the various xUnit options available for other languages.

Up to this point, I have only used the xUnit Test Framework with JUnit and Java. The book does a nice job explaining how to apply the Unit Test Framework to any development project. It goes into more depth on JUnit, CppUnit, NUnit (.NET), PyUnit (Python), and XMLUnit. I like the fact I now have a single book to get me started Unit Testing in pretty much any other language.

In my opinion, the book should have included more depth on the various other xUnit implementations. It also comes with a CD which contains and entire 14Mb of code and examples, which seemed a little silly. The examples could have easily been downloaded from somewhere and saved some money on the price of the book.

A nice start and does a good job covering a few of the xUnit Frameworks, but I wish it had taken the extra time to cover more implementations.
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


3 of 3 people found the following review helpful:
5.0 out of 5 stars Excellent book, explains the core of testing frameworks, May 26, 2005
By 
This review is from: Unit Test Frameworks (Paperback)
I have been using JUnit for unit testing on Java for quite a while and I have also been exposed to other testing frameworks, but had never looked under the hood is such detail as Paul does in this book.

He starts with a good overview of what a unit test framework and then takes us to a very nice tutorial on building your own unit test framework from scratch. This exercise is very well documented and you learn the basic principles behind a unit test framework while building a simple application and the unit tests required to test it.

After laying out the foundation, he goes on to explain in more detail how to write unit tests, how to use assertions, how to deal and test exceptions and expected errors, how to test protected behavior, how to organize your project for testing and using more advanced techniques like mock objects and performance testing.

He also includes a chapter that deals with testing GUIs (Graphical User Interfaces) which is a challenging task, but he offers good ideas for doing test driven development for a GUI to the application that we have been building during the previous chapters.

After all the basic concepts have been covered, the next chapters are dedicated to the most important (or more popular) unit test frameworks which are JUnit for Java, CppUnit for C++, NUnit for C# on .NET, PyUnit for Python and XMLUnit for XML documents. It is interesting to note that throughout the book the author uses the same application for the example code, so that we can compare the actual implementation of the tests using the different frameworks.

In the appendices, there is a C++ version of the simple Java framework that was built on chapter 2 and there are also summaries of the class reference documentation for JUnit and CppUnit.

Overall I think it is a very solid book with good examples and very concise content. Even though it doesn't cover all the unit test frameworks that exist today, I think it covers the most important ones, but the real gem is on the in-depth analysis of what makes a unit test framework.

If you are already familiar with one or more unit test frameworks, this book will give you a deeper understanding of them, and if you are still programming without writing unit tests... shame on you ;-)... buy this book and learn how simple it is to have a very good unit testing framework, no matter what language you use.
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No

Share your thoughts with other customers: Create your own review
 
 
 
Most Recent Customer Reviews









Only search this product's reviews



Inside This Book (learn more)
Key Phrases - Statistically Improbable Phrases (SIPs): (learn more)
test driven development, agile development, static method suite, multiple test methods, unit test framework, public void tearpown, assert methods, unit test classes, boolean assertion, writing unit tests, test coupling, test assert, return suite, test runner, test frameworks, string author, smart object, code duplication
Key Phrases - Capitalized Phrases (CAPs): (learn more)
Carl Sagan, Frank Herbert, Add Book, Stanislaw Lem, Unit Test Frameworks, The Dragons of Eden, Getting Started, Writing Unit Tests Example, Unknown Source, The Reflection, American Beauty, Applications Example, Jack Kerouac, Extreme Programming, String Title
Browse Sample Pages:
Front Cover | Table of Contents | First Pages | Index | Back Cover | Surprise Me!
Search Inside This Book:


What Other Items Do Customers Buy After Viewing This Item?


Tags Customers Associate with This Product

 (What's this?)
Click on a tag to find related items, discussions, and people.
 

Your tags: Add your first tag
 

Customer Discussions

This product's forum
Discussion Replies Latest Post
Recomendation 0 Mar 15, 2006
See all discussions...  
Start a new discussion
Topic:
First post:
Prompts for sign-in
 


Active discussions in related forums
Search Customer Discussions
   
Related forums





Look for Similar Items by Category


Look for Similar Items by Subject