Book description
JUnit is the leading Java unit testing framework and its version 4.8 significantly improves the Java development process. Designed for productivity, it has extensions for newer application styles—like Ajax and HTML-based presentation layers—and for application frameworks like EJB and OSGi.
JUnit in Action, Second Edition is an entirely revised and up-to-date guide to unit testing Java applications. It provides techniques for solving real-world problems such as using mocks for testing isolation, in-container testing for Java EE and database applications, and test automation. In an example-driven style, it covers JUnit 4.8 innovations such as the new annotations that simplify test writing, improved exception handling, and the new assertion methods. Along the way, you'll learn to integrate JUnit with other important open source frameworks and tools.
About the Technology
JUnit is the leading Java unit testing framework and its version 4.8 significantly improves the Java development process. Designed for productivity, it has extensions for newer application styles—like Ajax and HTML-based presentation layers—and for application frameworks like EJB and OSGi.
About the Book
JUnit in Action, Second Edition is an entirely revised and up-to-date guide to unit testing Java applications. It provides techniques for solving real-world problems such as using mocks for testing isolation, in-container testing for Java EE and database applications, and test automation. In an example-driven style, it covers JUnit 4.8 innovations such as the new annotations that simplify test writing, improved exception handling, and the new assertion methods. Along the way, you'll learn to integrate JUnit with other important open source frameworks and tools.
What's Inside
- Introduction to unit testing
- Blends JUnit with TDD, BDD, Continuous Integration, and other best practices
- Unit testing of database and web applications
About the Reader
About the Authors
Petar Tahchiev is a software engineer with HP and the Jakarta Cactus lead developer. Felipe Leme is a JCP member and contributor to DbUnit and Cactus. Gary Gregory is a Java developer with 20+ years of experience who currently develops application servers for legacy integration. Vincent Massol was the author of the first edition of JUnit in Action.
Quotes
The definitive guide, not just for JUnit, but unit testing in general.
- Tyson S. Maxwell, Raytheon
I recommend this book to anyone who is serious about testing with JUnit.
- Robert Hanson, Author of GWT in Action
Gives a solid foundation for unit testing, especially with Ant/Maven and Eclipse.
- Doug Warren, Java Web Services
This book shows how to test it all--leaves no stone unturned.
- John Griffin, Coauthor of Hibernate Search in Action
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: June 2010
- Publisher(s): Manning Publications
- ISBN: 9781935182023
You might also like
book
JUnit in Action, Third Edition
JUnit is the gold standard for unit testing Java applications. Filled with powerful new features designed …
book
JUnit in Action
Developers in the know are switching to a new testing strategy—unit testing—which interleaves coding and testing …
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
Pragmatic Unit Testing in Java 8 with JUnit
The Pragmatic Programmers classic is back! Freshly updated for modern software development, Pragmatic Unit Testing in …