Jump to ratings and reviews
Rate this book

Contract Testing in Action

Rate this book
Contract Testing in Action is a hands-on guide to contract testing for microservices applications and other systems of loosely-coupled components. After learning the basics of contract design and implementation, you’ll dive into constructing your own contract testing framework. You’ll explore the leading contract testing tools, including Pact, Pactflow, and GitHub Actions. Plus, you’ll set up consumer-driven contract testing for REST and GraphQL APIs and learn to integrate contract testing into a CI/CD pipeline. Finally, you’ll delve into provider-driven contract testing, which simplifies adoption by utilizing your existing stack and practices.

326 pages, Paperback

Published September 1, 2024

3 people are currently reading
22 people want to read

About the author

Marie Cruz

8 books2 followers

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
5 (62%)
4 stars
2 (25%)
3 stars
1 (12%)
2 stars
0 (0%)
1 star
0 (0%)
Displaying 1 - 4 of 4 reviews
Profile Image for Sebastian Gebski.
1,228 reviews1,412 followers
December 22, 2025
"A Pact book" would be probably a more adequate title as the book is solely focused on Pact. It's not the worst choice as Pact is both very popular and truly-battle-proven, but it's good to set the expectations straight.

TBH, "CTiA" felt a bit like it was written by Gen AI. An no, I'm not making accusations here - this impression is caused by the fact that the book feels very dry - like it was generated from Pact documentation ... It executes a reasonable plan, does it "ruthlessly" point by point, but unfortunately going mostly through "happy-path" scenarios.

It covers both popular approaches: consumer-driven and provider-driven. Additionally it goes beyond typical RESTful APIs and touches both GraphQL and event-driven approach. That all sounds awesome, but it feels like your tutored to repeat the tutorial ... Where's real-life in that? Where are challenges? What about patterns and anti-patterns? Common mistakes? Challenges of scaling? How to organize contract testing in various branching models / environment approaches? There's literally no guidance that I'd expect from real practitioners. If asked ChatGPT to create such a book, I believely I'd get something really similar.

Unfortunately, I can't honestly recommend this one. It's OK to go through the basics if it's a part of a subscription (in my case it was OReilly), but I wouldn't pay a full price for it ;/
Profile Image for Oleksandr Romanov.
22 reviews
July 18, 2025
An excellent book on contract testing with Pact by Marie Cruz and Lewis Prescott.

Why should you read this book?
- The book contains a detailed explanation of the idea of contract testing and how it fits in the current levels of testing
- The book has a bunch of examples on how to implement different approaches (consumer-driven and producer-driven) in different project contexts - Web, Mobile, GraphQL, Event-based apps, etc.
- The book is highly practical and contains exercises for self-assessment

I can recommend this book to any software engineer or test engineer who wants to understand what contract testing is and how to implement it on a project!
Profile Image for Christoph Kappel.
491 reviews11 followers
May 29, 2024
This was my first read of the first 109 pages that are in MEAP so far and although the code is JS-based and utilizes PactFlow it is a pretty good primer for the whole idea.

I especially like the strong focus to replace Integration Testing with the combination of Contrat and Unit Testing.
1 review
January 3, 2025
This is a must-read for those who know as well as want to know about contract testing.
The book first helps sell the concept of contract testing by explaining various aspects of it and then digs deeper into details with PACT framework.
Displaying 1 - 4 of 4 reviews

Can't find what you're looking for?

Get help and learn more about the design.