Chapter 6. Contract tests
This chapter covers
- Understanding and writing contract tests
- Using consumer-driven contracts
- Working with Pact JVM
- Integrating with Arquillian
So far in this book, you’ve learned about unit, component, and integration tests. One thing they have in common is that they don’t test the entire application, but rather isolated parts of it. With unit tests, the unit under test consists of only one or a few classes; with integration tests, you test whether boundaries can connect to a real service. This is the first chapter in which you’ll write tests to understand the application as a whole. In this chapter, you’ll learn why it’s important to use contract tests to verify the entire system, and how to write them.