Book description
JUnit in Action, Third Edition has been completely rewritten for this release. The book is full of examples that demonstrate JUnit's modern features, including its new architecture; nested, tagged, and dynamic tests; and dependency injection. You'll benefit from author Cătălin Tudose's unique "pyramid" testing strategy, which breaks the testing process into layers and sets you on the path to bug-free code creation.Table of contents
- JUnit in Action
- Copyright
- dedication
- contents
- front matter
- Part 1. JUnit
- 1 JUnit jump-start
- 2 Exploring core JUnit
- 3 JUnit architecture
- 4 Migrating from JUnit 4 to JUnit 5
- 5 Software testing principles
- Part 2. Different testing strategies
-
6 Test quality
- 6.1 Measuring test coverage
-
6.2 Writing testable code
- 6.2.1 Understanding that public APIs are contracts
- 6.2.2 Reducing dependencies
- 6.2.3 Creating simple constructors
- 6.2.4 Following the Law of Demeter (Principle of Least Knowledge)
- 6.2.5 Avoiding hidden dependencies and global state
- 6.2.6 Favoring generic methods
- 6.2.7 Favoring composition over inheritance
- 6.2.8 Favoring polymorphism over conditionals
- 6.3 Test-driven development
- 6.4 Behavior-driven development
- 6.5 Mutation testing
- 6.6 Testing in the development cycle
- Summary
- 7 Coarse-grained testing with stubs
- 8 Testing with mock objects
- 9 In-container testing
- Part 3. Working with JUnit 5 and other tools
- 10 Running JUnit tests from Maven 3
- 11 Running JUnit tests from Gradle 6
- 12 JUnit 5 IDE support
- 13 Continuous integration with JUnit 5
- Part 4. Working with modern frameworks and JUnit 5
- 14 JUnit 5 extension model
- 15 Presentation-layer testing
- 16 Testing Spring applications
- 17 Testing Spring Boot applications
- 18 Testing a REST API
- 19 Testing database applications
- Part 5. Developing applicationswith JUnit 5
- 20 Test-driven development with JUnit 5
- 21 Behavior-driven development with JUnit 5
- 22 Implementing a test pyramid strategy with JUnit 5
- appendix A. Maven
- appendix B. Gradle
- appendix C. IDEs
- appendix D. Jenkins
- index
Product information
- Title: JUnit in Action, Third Edition
- Author(s):
- Release date: January 2021
- Publisher(s): Manning Publications
- ISBN: 9781617297045
You might also like
video
Python Fundamentals
51+ hours of video instruction. Overview The professional programmer’s Deitel® video guide to Python development with …
book
Python Crash Course, 2nd Edition
This is the second edition of the best selling Python book in the world. Python Crash …
book
Python for Data Analysis, 2nd Edition
Get complete instructions for manipulating, processing, cleaning, and crunching datasets in Python. Updated for Python 3.6, …
book
Hands-On Machine Learning with Scikit-Learn, Keras, and TensorFlow, 2nd Edition
Through a series of recent breakthroughs, deep learning has boosted the entire field of machine learning. …