mock objects

  • submit to reddit

Unit Testing Fundamentals

This article describes the principles of unit testing, rather than the technical details. It's aimed at beginners. Experienced unit-testers will get little from it, except perhaps the pleasure of pointing out mistakes. (Edit: a few sentences redrafted as a...

8 replies - 7096 views - 02/08/11 by Andrew Spencer in Articles

Test Behavior, Not State

Many developers and testers write automated tests. Sometimes they're unit tests, other times package level, and occasionally integration. There are many different types of tests, but there are a few characteristics of great tests. Today let's look at one...

4 replies - 8970 views - 08/25/10 by Jared Richardson in Articles

The Concept of Mocking

To someone who is new to unit testing, the idea of mock objects can be confusing to say the least.  I have covered in previous tutorials how to use various mock object frameworks (EasyMock and jmockit).  However in this tutorial, we will focus on the...

0 replies - 6634 views - 08/16/08 by Michael Minella in Articles

Your Unit Tests Should Mind Their Own Business

As the unit testing debates continue on my project, I can't help but noticing that people are spending all sorts of time pontificating over the right way to unit test, without stepping back to consider what they're trying to achieve with unit testing. And...

4 replies - 7819 views - 07/16/08 by Abby Fichtner in Articles

Unit Testing with TestNG and JMockit Part 2

This tutorial is part two in a two part series on TestNG and jmockit. The previous tutorial (found here) covered the classic JUnit and EasyMock scenario, only with TestNG and jmockit. Although you can do that type of testing with these two technologies, that...

0 replies - 8899 views - 06/30/08 by Michael Minella in Articles