Skip to end of metadata
Go to start of metadata

Quick start

  • Read each of the following
    • Read chapter 1-2 in Pragmatic Unit Testing by Hunt and Thomas for an excellent introduction with anecdote to unit testing.
    • Read chapter 4 in Refactoring by Fowler for excellent practical advice regarding what to test and how much to test. This chapter is available at
    • Read one of the recommend reading articles for JUnit to familiarize yourself with at least one implementation of unit testing.
  • If you plan to seriously apply unit testing to your projects, you should also familiarize yourself with chapter 4 and 5 in Pragmatic Unit Testing on Right-BICEP and CORRECT unit testing.
  • If you are an SSG software developer, and want to read a testing plan used in a real software project, see S:\MDAC\Administration\Analysis_plans\Testing\testing plan draft-jw-002.doc. Though it is slightly out-of-date, this plan was used for the HDBSTAT software with success, and the ideas contained within are still relevant.
  • The Way of Testivus is a short humorous article and a nice, enjoyable read on unit testing.

Unit Testing in Java

Recommended Reading

Advanced reading

Refactoring for testing

  • See pages 103-114 in Pragmatic Unit Testing.


  • See Appendix A in Pragmatic Unit Testing.

Unit Testing in Other Languages
Of special note is RUnit. Thanks for the heads up, Tapan!
Here is a link for SAS unit testing. Note that you must register for the most current version of futs. For automation use, one must install a version of perl and have certian path variable settings done. Still in testing and don't know if this is good quality. ( Ray ).

Here's a dated article that compares a few unit testing libraries in C++. Note that the two popular choices, CppUnit and Boost.Test have come a long way since then. However its among the better articles available out there.

Mock Objects

First generation

This generation focuses on using mock objects for testing.

  • Thomas, D., Hunt, A., Mock Objects, IEEE Software May/June 2002.
  • Mackinnon, T., Freeman, S., Craig, P., Endo-Testing: Unit Testing with Mock Objects, XP2000 conference paper.
  • Freeman, S. How Mock Objects Happened.
    • I have a print-out of this short article from years ago, but can no longer find the online reference. Anyone have it? We may need to contact the author.
    • It has a nice example of a Robot.
  • Freeman, S. Developing JDBC applications test-first.
    • Again, I only have a print-out.

Second generation

This generation focuses on using mock objects for design.

Frameworks for mock objects in Java

Other resources

  • None