liveBook · Manning

Branch

As explained in Contract Testing in Action

A branch is a named line of development used to associate Pact artifacts with a particular development stream.

A branch is a named development stream that associates Pact artifacts with related code changes. In a pull-request workflow, it prevents a provider from verifying an unfinished consumer contract against unrelated provider changes. section 10.2.2 section 10.5

Matching consumer and provider work

A WebConsumer feature branch publishes a contract distinct from the contract merged to main. MoviesAPI then verifies the contract from the matching branch as well as the main-branch contract, avoiding false failures while both teams develop the same feature. section 10.2.2

Configure branches in a CI/CD workflow by:

  • Use the same branch name when consumer and provider teams collaborate on one feature. section 10.5

How Contract Testing in Action covers it

How deep it goes
Explains branch creation during publication and verification, environment configuration, selectors, and automated workflow testing.
Examples
Uses WebConsumer and MoviesAPI contracts, GitHub Actions variables, package.json scripts, and GraphQL workflow exercises.
What it assumes
Assumes contract testing, Pact participants, Git branches, CI/CD workflows, and environment variables; teaches branch-specific Pact configuration.
What you can do after
Operate/configure Pact publication and verification so providers select contracts from matching and main branches.
How it connects
Connects Git branches with contract testing, versioning, CI/CD pipelines, consumer version selectors, and Pact verification.

Also explained in

Compare how 6 books explain branch →

Related concepts

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.