small medium large xlarge

Now in Print: Pragmatic Unit Testing in Java 8 with JUnit

March 18, 2015

On this day in 1944–as if the world didn't have enough troubles already—Mount Vesuvius decided to erupt, killing a bunch of villagers. Which just goes to show that you never really know what's gurgling under the surface, building up pressure and steam, ready to blow any second and rain destruction. A lot of code out there might fit that same description.

Don't wait for your own Vesuvian explosion of festering bugs. Start unit testing, or get better at unit testing, or get everyone unit testing, today with Pragmatic Unit Testing in Java 8 with JUnit, now in print and shipping from

Pragmatic Unit Testing in Java 8 with JUnit

Pragmatic Unit Testing in Java 8 with JUnit steps you through all the important unit testing topics. If you've never written a unit test, you'll see screen shots from Eclipse, IntelliJ IDEA, and NetBeans that will help you get past the hard part—getting set up and started.

Once past the basics, you'll learn why you want to write unit tests and how to effectively use JUnit. But the meaty part of the book is its collected unit testing wisdom from people who've been there, done that on production systems for at least 15 years: veteran author and developer Jeff Langr, building on the wisdom of Pragmatic Programmers Andy Hunt and Dave Thomas. You'll learn:

  • How to craft your unit tests to minimize your effort in maintaining them.
  • How to use unit tests to help keep your system clean.
  • How to test the tough stuff.
  • Memorable mnemonics to help you remember what's important when writing unit tests.
  • How to help your team reap and sustain the benefits of unit testing.

You won't just learn about unit testing in theory—you'll work through numerous code examples. When it comes to programming, hands-on is the only way to learn!

Now in print and shipping from

Upcoming Author Appearances

  • 2015-03-19 Adam Tornhill, Webstep open competence evening, Oslo, Norway
  • 2015-03-23 Seb Rose, DevWeek, London
  • 2015-03-24 Adam Tornhill, DevWeek, London, UK
  • 2015-03-25 Adam Tornhill, DevWeek, London, UK
  • 2015-03-26 Rachel Davies, CukeUp, London
  • 2015-03-26 Chris Adamson, CocoaConf Chicago
  • 2015-03-26 Seb Rose, CukeUp, London
  • 2015-03-27 Chris Adamson, CocoaConf Chicago
  • 2015-03-27 Janie Clayton, CocoaConf Chicago
  • 2015-03-28 Chris Adamson, CocoaConf Chicago
  • 2015-03-31 Johanna Rothman, Influential Agile Leader, San Francisco
  • Did You Know?

    We publish books across a range of technologies for folks at different levels of abilities, all the way from novice to expert. If you haven't browsed all of our titles recently, come take a look:

    Agile Practices • Android, iPhone, and Mobile Programming • Career Development • Cool Things for Smart People • DIY & Hardware • For Beginners • Gaming • Java and JVM Languages • Mac, iPhone, and iPad Programming • Pragmatic exPress • Ruby and Rails • Testing, Design, and Cloud Computing • Tools, Frameworks, Languages • Web 2.0+

    Come check out all our categories at

    Don't Get Left Out

    Are your friends jealous that you get these spiffy email newsletters and they don't? Clue them in that all they need to do is create an account on (email address and password is all it takes) and select the checkbox to receive newsletters.

    Are you following us on Twitter and/or Facebook? Here's where you can find us and keep up with the latest news and commentary, and occasional discounts:

    Tell your friends! Tweet this

    Follow us on Twitter: @pragprog, @pragpub, Andy @PragmaticAndy and Dave @pragdave.

    Coming Soon:

    • Your Code as a Crime Scene: Use Forensic Techniques to Arrest Defects, Bottlenecks, and Bad Design in Your Programs, in print
    • Ruby Performance Optimization: Why Ruby is Slow, and How to Fix It, in beta
    • iOS 8 SDK Development: Creating iPhone and iPad Apps with Swift, in print
    • Clojure Applied: From Practice to Practitioner, in beta

    Recently Released:

    Thanks for your continued support,

    Andy & Dave The Pragmatic Programmers

    Books • eBooks • PragPub Magazine • Audiobooks and Screencasts