𝔖 Scriptorium
✦   LIBER   ✦

πŸ“

Pragmatic unit testing in Java with JUnit

✍ Scribed by Andy Hunt, Dave Thomas


Publisher
Pragmatic Bookshelf
Year
2003
Tongue
English
Leaves
163
Series
Pragmatic starter kit series 2
Edition
1
Category
Library

⬇  Acquire This Volume

No coin nor oath required. For personal study only.

✦ Synopsis


In the second volume of the sequence, Hunt and Thomas (software developers) offer guidance on writing better code, detecting and fixing potential problems, testing pieces of code, and testing with a whole team. They describe the process of unit testing with the freely-available JUnit library in Java, but the techniques they describe can be applied in other languages and frameworks as well.

✦ Table of Contents


About the Starter Kit......Page 8
Preface......Page 10
Introduction......Page 13
Coding With Confidence......Page 14
What is Unit Testing?......Page 15
What Do I Want to Accomplish?......Page 16
Excuses For Not Testing......Page 19
Roadmap......Page 24
Your First Unit Tests......Page 25
Planning Tests......Page 26
Testing a Simple Method......Page 27
More Tests......Page 32
Structuring Unit Tests......Page 33
JUnit Asserts......Page 34
JUnit Framework......Page 38
JUnit Test Composition......Page 39
JUnit Custom Asserts......Page 44
JUnit and Exceptions......Page 45
JUnit Test Skeleton......Page 47
Are the Results Right?......Page 49
Boundary Conditions......Page 52
Cross-check Using Other Means......Page 54
Force Error Conditions......Page 55
Performance Characteristics......Page 56
CORRECT Boundary Conditions......Page 58
Conformance......Page 59
Ordering......Page 60
Range......Page 62
Reference......Page 65
Existence......Page 66
Cardinality......Page 67
Time......Page 69
Try It Yourself......Page 71
Using Mock Objects......Page 75
Simple Stubs......Page 76
Mock Objects......Page 77
Testing a Servlet......Page 81
Easy Mock Objects......Page 84
Properties of Good Tests......Page 89
Automatic......Page 90
Thorough......Page 91
Repeatable......Page 92
Independent......Page 93
Professional......Page 94
Testing the Tests......Page 95
Where to Put Test Code......Page 99
Test Courtesy......Page 103
Test Frequency......Page 104
Tests and Legacy Code......Page 105
Tests and Reviews......Page 108
Designing for Testability......Page 111
Refactoring for Testing......Page 113
Testing the Class Invariant......Page 124
Test-Driven Design......Page 127
Testing Invalid Parameters......Page 129
``Smoke'' Tests......Page 131
Floating-Point Problems......Page 132
Tests Keep Breaking......Page 133
Tests Fail on Some Machines......Page 134
My main is Not Being Run......Page 135
Installing JUnit......Page 136
Command-line installation......Page 137
Does it work?......Page 138
JUnit Test Skeleton......Page 139
Basic Template......Page 141
On The Web......Page 144
Bibliography......Page 146
Summary: Pragmatic Unit Testing......Page 147
Answers to Exercises......Page 148


πŸ“œ SIMILAR VOLUMES


Pragmatic Unit Testing in Java with JUni
✍ Andy Hunt, Dave Thomas πŸ“‚ Library πŸ“… 2003 πŸ› The Pragmatic Programmers 🌐 English

Even if you are familiar with Unit Testing, JUnit, and Test Driven Development your skills will be sharpened by the content in this book. The book jumps right into general principles of unit testing such as what to test, how much test code to write, and when to test. A concept named Right-BICEP is i

Pragmatic Unit Testing in Java with JUni
✍ Andy Hunt, Dave Thomas πŸ“‚ Library πŸ“… 2003 πŸ› The Pragmatic Programmers 🌐 English

Even if you are familiar with Unit Testing, JUnit, and Test Driven Development your skills will be sharpened by the content in this book. The book jumps right into general principles of unit testing such as what to test, how much test code to write, and when to test. A concept named Right-BICEP is i

Pragmatic Unit Testing in Java 8 with JU
✍ Jeff Langr, Andy Hunt, Dave Thomas πŸ“‚ Library πŸ“… 2015 πŸ› The Pragmatic Programmers 🌐 English

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

Pragmatic unit testing: in C# with NUnit
✍ Andy Hunt, Dave Thomas, Matt Hargett πŸ“‚ Library πŸ“… 2007 πŸ› Pragmatic Bookshelf 🌐 English

The NIST estimates that poor testing costs the US economy $60 billion annually. This book gives teams straightforward and proven ways to introduce unit testing into their process, resulting in higher quality and fewer bugs.All over the world, software teams are using unit testing both to verify thei