The Pragmatic Programmers classic is back! Freshly updated for modern software development, Pragmatic Unit Testing in Java 8 With JUnit teaches you how to write and run easily maintained unit tests in JUnit with confidence. You'll learn mnemonics to help you know what tests to write, how to remember all the boundary conditions, and what the qualities of a good test are. You'll see how unit tests can pay off by allowing you to keep your system code clean, and you'll learn how to handle the stuff that seems too tough to test.
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!
Table of contents
Pragmatic Unit Testing in Java 8 with JUnit
- For the Best Reading Experience...
- Table of Contents
- Early praise for Pragmatic Unit Testing in Java 8 with JUnit
Part 1: Unit-Testing Foundations
- Chapter 1: Building Your First JUnit Test
- Chapter 2: Getting Real with JUnit
- Chapter 3: Digging Deeper into JUnit Assertions
- Chapter 4: Organizing Your Tests
Part 2: Mastering Manic Mnemonics!
- Chapter 5: FIRST Properties of Good Tests
Chapter 6: What to Test: The Right-BICEP
- [Right ] -BICEP: Are the Results Right?
- Right-[B ] ICEP: Boundary Conditions
- Remembering Boundary Conditions with CORRECT
- Right-B[I ] CEP: Checking Inverse Relationships
- Right-BI[C ] EP: Cross-Checking Using Other Means
- Right-BIC[E ] P: Forcing Error Conditions
- Right-BICE[P ] : Performance Characteristics
- Chapter 7: Boundary Conditions: The CORRECT Way
Part 3: The Bigger Design Picture
- Chapter 8: Refactoring to Cleaner Code
- Chapter 9: Bigger Design Issues
- Chapter 10: Using Mock Objects
Chapter 11: Refactoring Tests
- Searching for an Understanding
- Test Smell: Unnecessary Test Code
- Test Smell: Missing Abstractions
- Test Smell: Irrelevant Information
- Test Smell: Bloated Construction
- Test Smell: Multiple Assertions
- Test Smell: Irrelevant Details in Test
- Test Smell: Misleading Organization
- Test Smell: Implicit Meaning
- Adding a New Test
Part 4: The Bigger Unit-Testing Picture
- Chapter 12: Test-Driven Development
- Chapter 13: Testing Some Tough Stuff
- Chapter 14: Testing on a Project
- Appendix 1: Setting Up JUnit in IntelliJ IDEA and NetBeans
- Title: Pragmatic Unit Testing in Java 8 with JUnit
- Release date: March 2015
- Publisher(s): Pragmatic Bookshelf
- ISBN: 9781941222591
You might also like
Clean Code: A Handbook of Agile Software Craftsmanship
Even bad code can function. But if code isn't clean, it can bring a development organization …
97 Things Every Java Programmer Should Know
If you want to push your Java skills to the next level, this book provides expert …
Java in a Nutshell, 7th Edition
This updated edition of Java in a Nutshell not only helps experienced Java programmers get the …
Modern Java in Action
Modern Java in Action connects new features of the Java language with their practical applications. Using …