Article

Get Acquainted with the New Advanced Features of JUnit 4

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]

An early look at JUnit 4

This is a breif look at JUnit 4. [Article Text]

Approaches to Mocking

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]

Using JUnit With Eclipse IDE

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]

Test-Driven Plug-In Development

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]

A Dozen Ways to Get the Testing Bug in the New Year

This article gives you 12 practical ways to start writing tests, and keep writing tests, regardless of your development process. [Article Text]

Build a Java Web Application Using HttpUnit and the Test-driven Methodology, Part II

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]

Build a Java Web App Using HttpUnit and the Test-driven Methodology, Part I

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]

Subverting Java Access Protection for Unit Testing

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.

JUnit Automates Java Testing

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]

Syndicate content