quality

TwitterFacebook
Get flash to fully experience Pearltrees

Writing good unit tests, Part 1: Follow your GUTs

http://www.javaworld.com/javaworld/jw-03-2009/jw-03-good-unit-tests-1.html Best practices and tools for high-quality test code By Klaus P. Berg, JavaWorld.com, 03/17/09 Just like production code, test code needs to be rigorously examined to ensure it's clean and bug free.
Assertions, exceptions, and refactoring in test code By Klaus P. Berg, JavaWorld.com, 04/09/09 Klaus Berg continues his in-depth investigation of tools and best practices for programming with GUTs. Get tips for writing cleaner and more efficient assertions with the help of a matching library (Hamcrest) and handling checked and unchecked exceptions in JUnit 3 and 4 and TestNG.

Writing good unit tests, Part 2: Follow your nose

http://www.javaworld.com/javaworld/jw-04-2009/jw-04-good-unit-tests-2.html
The term 'Mock Objects' has become a popular one to describe special case objects that mimic real objects for testing. Most language environments now have frameworks that make it easy to create mock objects. What's often not realized, however, is that mock objects are but one form of special case test object, one that enables a different style of testing. http://www.martinfowler.com/articles/mocksArentStubs.html

Mocks Aren't Stubs