Pragmatic Unit Testing in Java with JUnit, Third Edition (Pragmatic Bookshelf)

PragmaticBookshelf
Done poorly, unit testing wastes your time and degrades your code. So pick up the third edition of this book and see how to test properly and easily.

Jeff Langr @jlangr

Edited by Kelly Talbot @KellyTalbot

The classic Pragmatic Unit Testing with Java in JUnit returns for a third edition, streamlined and rewritten with updated and more accessible code examples. In this edition, you’ll learn how to create concise, maintainable unit tests with confidence. New chapters provide a foundation of examples for testing common concepts, and guidance on incorporating modern AI tools into your development and testing. Updated topics include improving test quality via development mnemonics, increasing ROI through test and production code refactoring, and using tests to drive development.

Pragmatic Unit Testing in Java with JUnit steps you through all the important unit testing topics.

If you’ve never written a unit test, you’ll be hand-held through the hard part—getting set up and started. Once past the basics, you’ll see numerous examples in order to start understanding what tests for common code concepts look like. You’ll then learn how to effectively use the essential features of JUnit, the predominant tool for writing and executing unit tests in Java.

You’ll gain the collected unit testing wisdom of folks who’ve “been there, done that” on production systems for many combined decades: Jeff Langr, Andy Hunt, and Dave Thomas. You’ll learn how to:

  • Craft your code to make unit testing easier in the first place
  • Craft your unit tests to minimize your maintenance effort
  • Use unit tests to support keeping your system clean through refactoring
  • Refactor toward a design that will create the highest possible ROI
  • Test the tough stuff, including code that must be mocked
  • Remember what’s important when writing unit tests
  • Help your team reap and sustain the benefits of unit testing
  • Use AI tooling as part of a development process that incorporates unit testing

You won’t just learn about unit testing in theory—you’ll learn about “real” unit testing the Pragmatic way, by working through numerous code examples.

Jeff Langr is a veteran software developer with 40+ years experience building software. Jeff provides consulting, training, development, and coaching to customers through Langr Software Solutions, Inc. Jeff also wrote Agile in a Flash (with Tim Ottinger) and Modern C++ Programming with Test-Driven Development for the Pragmatic Bookshelf.


Don’t forget you can get 35% off with your Devtalk discount! Just use the coupon code “devtalk.com" at checkout :+1:

Latest Threads About This Book Top

demmer12
On page 241 of the PDF in listing utj3-tdd/31/src/test/java/app/APortfolio.java, the arguments to assertEquals are reversed. Instead of ...
New
AndrzejProchyra
The link https://www.developer.com/design/working-with-design-patterns-flyweight/ no longer functions since developer.com seems to have c...
New
PragmaticBookshelf
Done poorly, unit testing wastes your time and degrades your code. So pick up the third edition of this book and see how to test properly...
New

Most Active This Week Top

Most Active This Month Top

demmer12
On page 241 of the PDF in listing utj3-tdd/31/src/test/java/app/APortfolio.java, the arguments to assertEquals are reversed. Instead of ...
New

Most Active This Year Top

PragmaticBookshelf
Done poorly, unit testing wastes your time and degrades your code. So pick up the third edition of this book and see how to test properly...
New
AndrzejProchyra
The link https://www.developer.com/design/working-with-design-patterns-flyweight/ no longer functions since developer.com seems to have c...
New

Most Active Last Three Years Top

Most Active Over Three Years Top

Book Info

Publisher: Pragmatic Bookshelf

Are you this book's author? To be notified of all posts made about it, sign up an account then click here, then select 'watching' from the bell icon in the top right corner.

Get money off!

The Pragmatic Bookshelf

35% off any eBook

Simply use coupon code "devtalk.com" at checkout. See full details here.