liveBook · Manning

Contract testing lifecycle

As explained in Contract Testing in Action

The contract testing lifecycle is the sequence of activities for creating, verifying, sharing, and maintaining contracts between software components.

The contract testing lifecycle organizes how consumers, providers, and their contracts are coordinated: teams identify the participants, agree where contracts belong, choose an approach, and verify compatibility. It reverses the usual integration-testing direction by making the interaction agreement explicit before relying on a shared integration environment. section 3.0

A practical lifecycle starts with coordination rather than test code:

  • Identify the consumer and provider involved in the interaction. section 3.0
  • Discuss contract ownership and storage with the relevant stakeholders. section 3.0
  • Choose consumer-driven or provider-driven contract testing according to the context. section 3.0
  • Verify compatibility without treating contract tests as a complete replacement for integration tests. section 3.0

API service and integration environment

An API service team traditionally writes integration tests, deploys to an integration environment, and waits for other teams to check their integrations. Contract testing reverses this flow, helping teams address flaky dependencies, unreliable environments, setup problems, and bad seed data through explicit interaction contracts. section 3.0

How Contract Testing in Action covers it

How deep it goes
Introduces terminology, storage discussions, approach selection, and testing scope, while deferring implementation steps.
Examples
Uses an API service, an integration environment, flaky dependencies, setup problems, bad seed data, and unreliable environments.
What it assumes
Assumes basic integration-testing experience while introducing contract-testing terminology and approaches.
What you can do after
Evaluate consumer-driven and provider-driven approaches against a team’s context without discarding integration testing entirely.
How it connects
Connects consumers, providers, contracts, contract brokers, integration testing, CDCT, and PDCT.

This explainer was generated by Manning's knowledge graph from the text of Contract Testing in Action. The section links point to the parts of the book it draws on.