Chapter 8. Troubleshooting JUnit

This chapter covers

  • Problems finding your tests
  • Problems executing your custom test suite and test setup
  • Problems executing your test after the first assertion fails
  • Problems reloading classes between tests
  • Problems reloading XML-related classes
  • Problems narrowing EJB references in your tests

Wouldn’t it be nice if everything worked exactly the way you expected it to work? Come to think of it, if that were so then you wouldn’t be reading this book—or maybe because you’re reading this book, the software you build will work exactly the way you expect. At least, that’s the idea.

This chapter is about how to handle those situations in which JUnit doesn’t do what you expect. Although JUnit is simple, it is a framework, ...

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.