3 A technical overview of contract testing
This chapter covers
- What consumers, providers, contracts and contract brokers are
- The contract testing lifecycle
- Contract testing tools
- Contract testing approaches
- The communication types that contract testing support
Before we walk through the implementation steps of contract tests (in later chapters), we first introduce the terminology and tooling. This chapter discuss what consumers and providers are about within software development. Also, 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 consumer-driven or provider-driven contract testing, guiding the best approach in your context.