3 A technical overview of contract testing
This chapter covers
- Defining consumers, providers, contracts, and contract brokers
- Contract testing life cycle
- Contract testing tools
- Contract testing approaches
- Communication types supported by contract testing
Before we walk through the implementation steps of contract tests (in later chapters), we’ll first introduce the terminology and tooling. This chapter discusses what consumers and providers are in relation to software development. In addition, before writing contract test code, you must start conversations with key stakeholders regarding where to store the contracts.
In this chapter, we explain the core contract testing concepts. Then, we talk about deciding which contract testing approach to take. We cover the two approaches offered within the contract testing domain: consumer-driven contract testing (CDCT), often referred to as the traditional approach, and provider-driven contract testing (PDCT). We describe the pros and cons of CDCT and PDCT, guiding you to the best approach in your context.