Cover by Gary Gregory, Vincent Massol, Felipe Leme, Petar Tahchiev

Safari, the world’s most comprehensive technology and business learning platform.

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required

O'Reilly logo

Appendix A. Differences between JUnit 3 and JUnit 4

This appendix covers

  • Changes between version 3.x and 4.x of JUnit
  • API changes
  • New features in JUnit 4.x

As you’ve probably seen, the new 4.x version of JUnit is a completely new framework. It’s more of a totally new project than a bug-fixing improvement of the old one. But it still deals with unit testing your Java code. That said, we will try to define all the differences between the latest version of JUnit and the 3.x version.

A.1. Global changes

This section discusses the changes in the requirements for using JUnit.

A.1.1. JDK required

JUnit 4 uses a lot from Java 5 annotations, generics, and static import features. Although the JUnit 3.x version can work with JDK 1.2+, this usage ...

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required