Chapter 6. Running JUnit tests

This chapter covers

  • Monitoring JUnit tests as they execute
  • Executing individual tests
  • Executing tests that need to reload classes
  • Ignoring tests
  • Using the JUnit-addons test runner

There are a number of ways to execute your tests, including a large variety of test runners, not all of which have the same set of features. JUnit provides three test runners: a text-based one, an AWT-based one, and a Swing-based one. We will describe each in turn. In addition to the ones that JUnit provides, a number of people have built their own test runners that include special features not found in the originals. The JUnit test runners were not built to be easily extended, and so whenever someone has wanted to add features, it has ...

Get JUnit Recipes: Practical Methods for Programmer Testing now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.