(Ebook PDF) Pragmatic unit testing in Java with JUnit 1st Edition by Andy Hunt, Dave Thomas-Ebook PDF Instant Download/Delivery: 9780974514017, 0974514012
Instant download Full Chapter of Pragmatic unit testing in Java with JUnit 1st Edition after payment
Product details:
ISBN 10:0974514012
ISBN 13: 9780974514017
Author: Andy Hunt, Dave Thomas
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.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.com website) to help you remember all this stuff.With this book you will:
Table of Contents:
Unit Testing Foundations
Building Your First JUnit Test
Reasons to Write a Unit Test
Learning JUnit Basics: Your First Passing Test
Arrange, Act, and Assert Your Way to a Test
Is the Test Really Testing Anything?
After
Getting Real with JUnit
Understanding What We’re Testing: The Profile Class
Determining What Tests We Can Write
Covering One Path
Tackling a Second Test
Initializing Tests with Before Methods
How Ya Feelin’ Now?
After
Digging Deeper into JUnit Assertions
Assertions in JUnit
Three Schools for Expecting Exceptions
After
Organizing Your Tests
Keeping Tests Consistent with AAA
Testing Behavior Versus Testing Methods
Relationship Between Test and Production Code
The Value of Focused, Single-Purpose Tests
Tests as Documentation
More on Before and After (Common Initialization and Cleanup)
Green Is Good: Keeping Our Tests Relevant
After
Mastering Manic Mnemonics!
FIRST Properties of Good Tests
FIRST It Helps to Remember That Good Tests Are FIRST[F]IRST: [F]ast!
F[I]RST: [I]solate Your Tests
FI[R]ST: Good Tests Should Be [R]epeatable
FIR[S]T: [S]elf-Validating
FIRS[T]: [T]imely
After
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-BICEP: Cross-Checking Using Other Means
Right-BIC[E]P: Forcing Error Conditions
Right-BICE[P]: Performance Characteristics
After
Boundary Conditions–The CORRECT Way[C]ORRECT: [C]onformance
C[O]RRECT: [O]rdering
CORRECT: [R]ange
COR[R]ECT: [R]eference
CORR[E]CT: [E]xistence
CORRE[C]T: [C]ardinality
CORREC[T]: [T]ime
After
The Bigger Design Picture
Refactoring to Cleaner Code
A Little Bit o’ Refactor
Finding Better Homes for Our Methods
Automated and Manual Refactorings
Taking Refactoring Too Far?
After
Bigger Design Issues
The Profile Class and the SRP
Extracting a New Class
Command-Query Separation
The Cost of Maintaining Unit Tests
Other Design Thoughts
After
Using Mock Objects
A Testing Challenge
Replacing Troublesome Behavior with Stubs
Changing Our Design to Support Testing
Adding Smarts to Our Stub: Verifying Parameters
Simplifying Testing Using a Mock Tool
One Last Simplification: Introducing an Injection Tool
What’s Important to Get Right When Using Mocks
After
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
After
The Bigger Unit Testing Picture
Test-Driven Development
The Primary Benefit of TDD
Starting Simple
Adding Another Increment
Cleaning Up Our Tests
Another Small Increment
Supporting Multiple Answers: A Small Design Detour
Expanding the Interface
Last Tests
Tests As Documentation
The Rhythm of TDD
After
Testing Some Tough Stuff
Testing Multithreaded Code
Testing Databases
After
Testing on a Project
Coming Up to Speed
Get on the Same Page With Your Team
Convergence With Continuous Integration
Code Coverage
After
Setting UP JUnit in IntelliJ IDEA and NetBeans
IntelliJ IDEA
NetBeans
People also search:
pragmatic unit testing in java with junit pdf
pragmatic unit testing in java with junit third edition
pragmatic unit testing in java 8 with junit
pragmatic unit testing in java 8 with junit pdf
what is junit testing in java with example
Tags:
Andy Hunt,Dave Thomas,Pragmatic Unit Testing,Java,JUnit