更新时间:2021-12-08 12:38:51
封面
版权页
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files eBooks discount offers and more
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Chapter 1. JUnit 4 – a Total Recall
Defining unit testing
Working with JUnit 4
Working with JUnit 4++
Summary
Chapter 2. Automating JUnit Tests
Continuous Integration
Jenkins
Chapter 3. Test Doubles
Dummy
Stub
Fake
Mock
Spy
Chapter 4. Progressive Mockito
Working with Mockito
Drinking Mockito
Chapter 5. Exploring Code Coverage
Understanding code coverage
Configuring the Eclipse plugin
Measuring coverage using Gradle
Working with the Maven Cobertura plugin
Running the Cobertura Ant task
Chapter 6. Revealing Code Quality
Understanding the static code analysis
Working with the Checkstyle plugin
Exploring the FindBugs plugin
Working with the PMD plugin
Monitoring code quality with SonarQube
Getting familiar with false positives
Chapter 7. Unit Testing the Web Tier
Unit testing servlets
Playing with Spring MVC
Chapter 8. Playing with Data
Separating concerns
Unit testing the persistence logic
Simplifying persistence with Spring
Verifying the system integrity
Writing integration tests with Spring
Chapter 9. Solving Test Puzzles
Working with the legacy code
Designing for testability
Working with greenfield code
Chapter 10. Best Practices
Writing meaningful tests
Automating JUnit tests
Configuring tests
Working with assertions
Handling exceptions
Working with test smells
Index