Skip to main content

JUnit Kung Fu: Getting More Out of Your Unit Tests

Posted by johnsmart on September 30, 2010 at 12:17 PM PDT

Here are the slides and audio for the JUnit Kung Fu talk I gave at JavaOne. Some of my other talks can be found here.

JUnit is the de facto standard in Java testing. Yet many advanced JUnit features are little known and poorly understood. This session reviews some lesser-known features of JUnit, along with a few associated libraries, that can make your unit tests more powerful, expressive, and fun. The session is intended for Java developers, lead developers, and architects trying to introduce good testing practices into their teams. Attendees will learn about:

  • The fine art of naming your tests
  • Writing clearer and more expressive tests with Hamcrest and Mockito
  • Data-driven testing in JUnit with parameterized tests and theories
  • Using JUnit rules to extend your test cases and writing your own rules to customize JUnit
  • Using JUnit categories to group your tests
  • Getting faster feedback with parallel testing and continuous testing tools

    Download the audio

Related Topics >>