Book description
Software testing is indispensable and is one of the most discussed topics in software development today. Many companies address this issue by assigning a dedicated software testing phase towards the end of their development cycle. However, quality cannot be tested into a buggy application. Early and continuous unit testing has been shown to be crucial for high quality software and low defect rates. Yet current books on testing ignore the developer's point of view and give little guidance on how to bring the overwhelming amount of testing theory into practice. Unit Testing in Java represents a practical introduction to unit testing for software developers. It introduces the basic test-first approach and then discusses a large number of special issues and problem cases. The book instructs developers through each step and motivates them to explore further.- Shows how the discovery and avoidance of software errors is a demanding and creative activity in its own right and can build confidence early in a project.
- Demonstrates how automated tests can detect the unwanted effects of small changes in code within the entire system.
- Discusses how testing works with persistency, concurrency, distribution, and web applications.
- Includes a discussion of testing with C++ and Smalltalk.
Table of contents
- Cover image
- Title page
- Table of Contents
- Copyright
- Foreword
- Foreword
- Preface
-
Part I: Basic Techniques
- Chapter 1: Introduction
- Chapter 2: Automating Unit Tests
- Chapter 3: Basic Steps of the Test-First Approach
- Chapter 4: Test Ideas and Heuristics
- Chapter 5: The Inner Life of a Test Framework
-
Chapter 6: Dummy and Mock Objects for Independence
- 6.1 Little Dummies
- 6.2 Weltering in Technical Terms
- 6.3 Big Dummies
- 6.4 Extending Our Mansion
- 6.5 Endoscopic Testing
- 6.6 Mock Objects from the Assembly Line
- 6.7 Testing Threshold Values and Exceptions
- 6.8 How Does the Test Get to the Mock?
- 6.9 Evil Singletons
- 6.10 Lightweight and Heavyweight Mocks
- 6.11 File Dummies
- 6.12 More Typical Mock Objects
- 6.13 External Components
- 6.14 The Pros and Cons
- 6.15 Summary
- Chapter 7: Inheritance and Polymorphism
- Chapter 8: How Much Is Enough?
- Part II: Advanced Topics
- Part III: Appendices
- Glossary
- Bibliography and List of References
- Index
- Inside Back Cover
Product information
- Title: Unit Testing in Java
- Author(s):
- Release date: June 2003
- Publisher(s): Morgan Kaufmann
- ISBN: 9780080520179
You might also like
book
Pragmatic Unit Testing in Java 8 with JUnit
The Pragmatic Programmers classic is back! Freshly updated for modern software development, Pragmatic Unit Testing in …
video
JUnit and Mockito Unit Testing for Java Developers
Are you looking for a simple, no-nonsense guide to learning how unit testing works? This video …
book
Testing with JUnit
Master high quality software development driven by unit tests About This Book Design and implement robust …
book
Unit Test Frameworks
Unit test frameworks are a key element of popular development methodologies such as eXtreme Programming (XP) …