Unit testing with mock objects
Resources
- "Endo-Testing: Unit Testing with Mock Objects," by Tim Mackinnon, Steve Freeman, and Philip Craig, is the paper that introduced the term mock objects.
- The Mock Objects Project is a framework that supports the implementation of mock objects.
- The source of the factory method and abstract factory design patterns is Design Patterns: Elements of Reusable Object-Oriented Software (Addison-Wesley, 1997) by Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides -- also known as the Gang of Four.
- If you're new to the world of design patterns, you may also want to take this free, two-part tutorial:
- Java design patterns 101 (developerWorks, January 2002) introduces patterns.
- Java design patterns 201 (developerWorks, April 2002) takes you beyond the patterns described by the Gang of Four.
- Read this online write-up of The Factory Method Design Pattern.
- The Refactoring Home Page maintained by Martin Fowler is a great resource for tidy programmers.
- In addition, Refactoring: Improving the Design of Existing Code (Addison-Wesley, 1999) by Martin Fowler makes for good reading.
- JUnit is the most popular unit-testing framework for the Java language.
- Check out the XP and Refactoring resource list at Purple Technology.
- The Demystifying Extreme Programming column by XP coach and Java developer Roy Miller offers insight into
this methodology, in which testing is a critical component. Don't miss
the accompanying discussion forum.
- Nicholas Lesiecki's "Test Flexibly with AspectJ and mock objects" (developerWorks, May 2002), details using AspectJ and mock objects when unit testing.
- "Diagnosing Java code: Unit tests and automated code analysis working together" by Eric Allen (developerWorks, October 2002) examines the relationship between unit testing and static analysis.
- The WebSphere Developer Domain offers a look at unit testing with JUnit in "Application Quality Assurance: Unit Testing."
- "Debugging and Unit-Testing Server-Side Web Applications," also from the WebSphere Developer Domain, describes a scenario for server-side Web development that includes interactive debugging and iterative unit testing.
- Find hundreds more Java technology articles and tutorials on the developerWorks Java technology zone.
View Unit testing with mock objects Discussion
Page: 1 2 3 4 5 6 Next Page: Improve your unit tests by replacing your collaborators with mock objectsFirst published by IBM developerWorks