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 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.