Book description
When JUnit was first introduced a decade ago by Kent Beck and Erich Gamma, the Agile movement was in its infancy, "Test Driven Development" was unknown, and unit testing was just starting to move into the typical developer's vocabulary. Today, most developers acknowledge the benefits of unit testing and rely on the increasingly sophisticated tools now available. The recently released JUnit 4.5 represents the state of the art in unit testing frameworks, and provides significant new features to improve the Java development process. JUnit in Action, Second Edition is an up-to-date guide to unit testing Java applications (including Java EE applications) using the JUnit framework and its extensions. This book provides techniques for solving real-world problems such as testing AJAX applications, using mocks to achieve testing isolation, in-container testing for Java EE and database applications, and test automation. Written to help readers exploit JUnit 4.5, the book covers recent innovations such as the new annotations that simplify test writing, improved exception handling, and the new assertion methods. You'll also discover how to use JUnit extensions to test new application styles and frameworks including Ajax, OSGi, and HTML-based presentation layers. Using a sample-driven approach, various unit testing strategies are covered, such as how to unit test EJBs, database applications, and web applications. Also addressed are testing strategies using freely available open source frameworks and tools, and how to unit test in isolation with Mock Objects. The book will also bring you up to speed on the latest thinking in TDD, BDD, Continuous Integration, and other practices related to unit testing.
Table of contents
- Copyright
- Dedication
- Brief Table of Contents
- Table of Contents
- Praise for the First Edition
- Preface
- Preface to the First Edition
- Acknowledgments
- About this Book
- About the Authors
- About the Cover Illustration
- Part 1. JUnit essentials
- Chapter 1. JUnit jump-start
- Chapter 2. Exploring core JUnit
- Chapter 3. Mastering JUnit
- Chapter 4. Software testing principles
- Part 2. Different testing strategies
- Chapter 5. Test coverage and development
- Chapter 6. Coarse-grained testing with stubs
- Chapter 7. Testing with mock objects
- Chapter 8. In-container testing
- Part 3. JUnit and the build process
- Chapter 9. Running JUnit tests from Ant
- Chapter 10. Running JUnit tests from Maven2
- Chapter 11. Continuous integration tools
- Part 4. JUnit extensions
- Chapter 12. Presentation-layer testing
- Chapter 13. Ajax testing
- Chapter 14. Server-side Java testing with Cactus
- Chapter 15. Testing JSF applications
- Chapter 16. Testing OSGi components
- Chapter 17. Testing database access
- Chapter 18. Testing JPA-based applications
- Chapter 19. JUnit on steroids
- Appendix A. Differences between JUnit 3 and JUnit 4
- Appendix B. Extending the JUnit API with custom runners and matchers
- Appendix C. The source code for the book
- Appendix D. JUnit IDE integration
- Appendix E. Installing software
- Index
- List of Figures
- List of Tables
- List of Listings
Product information
- Title: JUnit in Action, Second Edition
- Author(s):
- Release date: July 2010
- Publisher(s): Manning Publications
- ISBN: 9781935182023
You might also like
book
Modern Java in Action
Modern Java in Action connects new features of the Java language with their practical applications. Using …
book
Grokking Algorithms
Grokking Algorithms is a friendly take on this core computer science topic. In it, you'll learn …
book
Fluent Python, 2nd Edition
Python’s simplicity lets you become productive quickly, but often this means you aren’t using everything it …
video
Java 8 Fundamentals: Modern Java Development with Lambdas, Streams, and Introducing Java 9’s JShell and the Java Platform Module System (JPMS)
54+ hours of video instruction. Overview The professional programmer’s Deitel® video guide to Java™ SE 7 …