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
Test-Driven Java Development
Invoke TDD principles for end-to-end application development with Java About This Book Explore the most popular …
book
Test Driven Development: By Example
Clean code that works--now. This is the seeming contradiction that lies behind much of the pain …
book
40 Algorithms Every Programmer Should Know
Learn algorithms for solving classic computer science problems with this concise guide covering everything from fundamental …
book
Test-Driven Java Development - Second Edition
This book will teach the concepts of test driven development in Java so you can build …