Start reading Unit Test Frameworks on the free Kindle Reading App or on your Kindle in under a minute. Don't have a Kindle? Get your Kindle here.
Programming Books C Java PHP Python Learn more Browse Programming Books

Deliver to your Kindle or other device

Enter a promotion code
or gift card
 
 
 

Try it free

Sample the beginning of this book for free

Deliver to your Kindle or other device

Anybody can read Kindle books—even without a Kindle device—with the FREE Kindle app for smartphones, tablets and computers.
Sorry, this item is not available in
Image not available for
Color:
Image not available

To view this video download Flash Player

 

Unit Test Frameworks: Tools for High-Quality Software Development [Kindle Edition]

Paul Hamill
4.2 out of 5 stars  See all reviews (13 customer reviews)

Digital List Price: $23.99 What's this?
Kindle Price: $13.49
You Save: $10.50 (44%)

Formats

Amazon Price New from Used from
Kindle Edition $13.49  
Paperback --  
Shop the new tech.book(store)
New! Introducing the tech.book(store), a hub for Software Developers and Architects, Networking Administrators, TPMs, and other technology professionals to find highly-rated and highly-relevant career resources. Shop books on programming and big data, or read this week's blog posts by authors and thought-leaders in the tech industry. > Shop now

Book Description

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

  • File Size: 788 KB
  • Print Length: 216 pages
  • Simultaneous Device Usage: Unlimited
  • Publisher: O'Reilly Media; 1 edition (February 9, 2009)
  • Sold by: Amazon Digital Services, Inc.
  • Language: English
  • ASIN: B0026OR3H6
  • Text-to-Speech: Enabled
  • X-Ray:
  • Lending: Not Enabled
  • Amazon Best Sellers Rank: #303,656 Paid in Kindle Store (See Top 100 Paid in Kindle Store)
  •  Would you like to give feedback on images?


Customer Reviews

4.2 out of 5 stars
(13)
4.2 out of 5 stars
Share your thoughts with other customers
Most Helpful Customer Reviews
15 of 15 people found the following review helpful
Format: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).
Read more ›
Comment | 
Was this review helpful to you?
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
Format: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.
Comment | 
Was this review helpful to you?
3 of 3 people found the following review helpful
Format: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.
Read more ›
Comment | 
Was this review helpful to you?
3 of 3 people found the following review helpful
4.0 out of 5 stars expounds well in several languages November 20, 2004
Format:Paperback
Hamill directs this book towards programmers of any level of experience. He points out that in all likelihood, you have hand crafted simple unit tests to validate your code. Even if you did not call them unit tests, you had the basic concept down. He takes this as a mutual starting point, to ease you into a more formal testing approach. Why you should do it and how. For the how, he instantiates with the popular open source JUnit. So at the very least, the book is a full-fledged user's manual for JUnit

But he also covers other test frameworks, like CppUnit, XMLUnit, PyUnit and NUnit. For example, NUnit is used in the .NET environment, to test C# code. He gives several C# examples and how to combine these with NUnit. Likewise, PyUnit tests Python code and we see how from some examples. The book certainly lives up to its promise of being a language independent coverage of the concept of unit testing.
Comment | 
Was this review helpful to you?
Most Recent Customer Reviews
5.0 out of 5 stars Five Stars
Good as introduction / overview to Unit Test Frameworks.
Published 15 days ago by ThisIsMyName
5.0 out of 5 stars Great Intro for a Tester
After reading this book, I know what a unit test is and who should be writting these tests. The term 'unit test' is thrown around so loosley at work I feel like i'm in a dilbert... Read more
Published 21 months ago by Lisa Day
4.0 out of 5 stars A useful survey of testing tools
[reviewed by XPSD member Paul Hamill]

Unit testing and test-driven development (TDD) is a skill that has been desperately lacking on many of the projects I have been... Read more
Published on August 1, 2008 by XPSD
5.0 out of 5 stars A keeper
This is a very solid, no-nonsense introduction to unit test framework.

For a 200 page book, this one is packed with carefully chosen information, detailed enough for new... Read more
Published on May 10, 2005 by Sawallisch
5.0 out of 5 stars A really useful book
I have put off writing a review of this book because I had very mixed feelings. On the plus side, it is a very clear concise guide to unit testing - a great introduction. Read more
Published on April 30, 2005 by David N. Thielen
3.0 out of 5 stars njbulitka
I found this book to be a little on the thin side in terms of detail. I was hoping for a more detailed treatment of unit testing in general, and the various Frameworks available. Read more
Published on April 15, 2005 by njbulitka
5.0 out of 5 stars A must for test-first programmers
One of the major pushes in any agile methodology is that of test-first programming. Test first programming requires the developer to write a programmatic unit test to test the... Read more
Published on March 15, 2005 by ueberhund
4.0 out of 5 stars Solid book with a predominant Java slant...
An important part of programming that's become popular in recent years is the move towards test-driven programming. Read more
Published on January 17, 2005 by Thomas Duff
3.0 out of 5 stars Disappointing...
Although this book covers the use of unit tests in general and the xUnit frameworks in particular, Pete Hamill frequently doesn't go beyond basics available on the internet. Read more
Published on December 9, 2004 by Robert Stevenson
Search Customer Reviews
Search these reviews only

More About the Author

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

What Other Items Do Customers Buy After Viewing This Item?



Forums

Topic From this Discussion
Recomendation Be the first to reply
Have something you'd like to share about this product?
Start a new discussion
Topic:
First post:
Prompts for sign-in
 


Search Customer Discussions
Search all Amazon discussions

Look for Similar Items by Category