Cover of Pragmatic Unit Testing in Java with JUnit

Pragmatic Unit Testing in Java with JUnit

Learn how to improve your Java coding skills using unit testing. Despite it's name, unit testing is really a coding technique, not a testing technique. Unit testing is done by programmers, for programmers. It's primarily for our benefit: we get improved confidence in our code, better ability to make deadlines, less time spent in the debugger, and less time beating on the code to make it work correctly.

Read more

This book shows how to write tests, but more importantly, it goes where other books fear to tread and gives you concrete advice and examples of what to test—the common things that go wrong in all of our programs. Discover the tricky hiding places where bugs breed, and how to catch them using the freely available JUnit framework. It's easy to learn how to think of all the things in your code that are likely to break. We'll show you how with helpful mnemonics, summarized in a handy tip sheet (also available from our www.pragmaticprogrammer.comwebsite) to help you remember all this stuff.

With this book you will:

Write better code, and take less time to write it Discover the tricky places where bugs breed Learn how to think of all the things that could go wrong Test individual pieces of code without having to include the whole project Test effectively with the whole team

We'll also cover how to use Mock Objects for testing, how to write high quality test code, and how to use unit testing to improve your design skills. We'll show you frequent "gotchas"—along with the fixes—to save you time when problems come up. We'll show you how with helpful mnemonics, summarized in a handy tip sheet (also available from our www.pragmaticprogrammer.comwebsite).But the best part is that you don't need a sweeping mandate to change your whole team or your whole company. You don't need to adopt Extreme Programming or Test-Driven Development, or change your development process in order to reap the proven benefits of unit testing. You can start unit testing, the pragmatic way, right away.

Audience
adult
Length
short · 176 pages

Click a tag to see books like this one that share it. Point at it (on a phone, tap it) for less of it instead.

Read it? Sign in to help tag it.

Liked Pragmatic Unit Testing in Java with JUnit? Here’s where I’d start.

These suit anyone who liked Pragmatic Unit Testing in Java with JUnit. Sign in and mark a few books for picks shaped around your own taste.

  1. JUnit in Action Shares Java, programming, technical
  2. Head First Servlets and JSP: Passing the Sun Certified Web Component Developer Exam Shares programming, Java, technical
  3. Java Persistence with Hibernate Shares Java, programming, software development
  4. Ship It! Shares programming, software development, technical

“People who read Pragmatic Unit Testing in Java with JUnit tend to reach for these next.”

  1. Pragmatic Version Control: Using Subversion (The Pragmatic Starter Kit Series)
  2. Specification by Example
  3. Practices of an Agile Developer: Working in the Real World
  4. Grails in Action

“If you want more of the same (science about technology), start with these.”

  1. Essential PHP Security
  2. jQuery Cookbook: Solutions & Examples for jQuery Developers
  3. MCTS Self-Paced Training Kit (Exam 70-515): Web Applications Development with Microsoft® .NET Framework 4
  4. PHP 5 Power Programming

“If it was the Java that hooked you, try one of these.”

  1. The Well-Grounded Java Developer: Vital techniques of Java 7 and polyglot programming
  2. Java 8 in Action
  3. Spring in Action
  4. Thinking in Java

“These start from a similar idea, even if they go somewhere else with it.”

  1. Rails 4 Test Prescriptions: Build a Healthy Codebase
  2. Modern C++ Programming with Test-Driven Development: Code Better, Sleep Better
  3. JavaScript Testing with Jasmine: JavaScript Behavior-Driven Development
  4. Effective Unit Testing