Chapter 9. Testing and Troubleshooting

With the following listed recipes, this chapter introduces a set of common practices for maintaining, debugging, and improving an application state:

  • Automating Database Migrations with Flyway
  • Unit testing with Mockito and Maven Surefire
  • Integration testing with Cargo, Rest-assured, and Maven Failsafe
  • Injecting Spring Bean in Integration tests
  • Modern application Logging with Log4j2

Introduction

As we are now approaching the end of this journey, we must see how to consolidate the work. In the real world, tests must be written before a feature is developed (or at least at the same time). Writing automated tests in software development conveys a massive confidence about the application state. It is the best way of ensuring ...

Get Spring MVC: Designing Real-World Web Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.