Chapter 7. Reporting JUnit results

This chapter covers

  • Logging from a Base Test Case
  • Logging with Log4Unit
  • Reporting results with Ant, including <junitreport>
  • Customizing Ant’s test run reports
  • Using a custom TestListener
  • Counting assertions

This chapter covers various tools and techniques available for reporting JUnit test results, including extending JUnit to write your own custom reporting mechanisms. JUnit by itself provides two simple mechanisms for reporting test results: simple text output to System.out and its famous Swing and AWT “green bar” GUIs (the AWT GUI being a vestige of JUnit’s Java 1.1 support). The results reporting that JUnit provides out of the box is useful for developers at their desktops, but that is about it. You need ...

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.