JUnit 4 is a completely different API from the versions that came before it and depends on new features of Java 5.0 (annotations, static import...). As you'll see, JUnit 4 is simpler, richer, and easier to use and introduces more flexible initialization and cleanup, timeouts, and parameterized test cases. [Article Text]
This is a breif look at JUnit 4. [Article Text]
Everyone knows what a mock is, just from the name, but as with many seemingly simple ideas, there is more to them than first meets the eye. This article explores the two types of mocks that exist and covers some of the problems inherent in their use. Finally, it considers the reason why a developer might chose to use mocks. After all, common understanding holds that mocks are used for unit testing, a key part of Test Driven Design [Article Text]
This article is going to introduce you to JUnit, a tool for project testing and debugging. After introducing the theory of test-driven development, we'll move on to a step-by-step explanation of how you can create your JUnit tests with the help of the popular Eclipse IDE. We'll show how something as simple as a Hello World program can be exposed to a JUnit test. [Article Text]
Chapter 12 from Kent Beck and Erich Gamma's book Contributing to Eclipse: Principles, Patterns, and Plugins about Test-Driven Plug-In Development. [Article Text]
This article gives you 12 practical ways to start writing tests, and keep writing tests, regardless of your development process. [Article Text]
Part I concluded with a successful test of the application. To complete it, however, you still have to build the following functions: new contact, delete contacts, and edit contact. You also need to write the tests for those functions before implementing the application's full functionality. Part II completes the example, performing these tests and filling out the functionality of the phone list application. [Article Text]
The HttpUnit client API complements JUnit functionality to provide thorough Web testing capability. This first article of a two-part series breaks down how HttpUnit delivers these features and walks you through a step-by-step setup of a test-driven environment. [Article Text]
The Java Reflection API allows the program to introspect arbitrary classes at runtime, accessing members at will. Most competent Java programmers should know this much, but what many don't know is that the security layer preventing you from accessing private members is only optional, and can be turned off. This allows the system code to be written without explicitly planning the unit tests, and if the unit tests really do need to access a private or protected member, they can.
It doesn't matter how much time you put into design and how careful you are when programming; mistakes are inevitable. Without automated testing, it is time consuming and difficult to ensure that changes will not break existing code. Fortunately, for Java programmers, JUnit makes such testing easy. JUnit makes it fast and easy to set up unit tests for your programs. [Article Text]