O'Reilly logo

JUnit Recipes: Practical Methods for Programmer Testing by J B Rainsberger, Scott Stirling

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required