Skip to content
Home/ Contract Testing in Action: With Pact, Pactflow, and Github Actions
Contract Testing in Action: With Pact, Pactflow, and Github Actions

Contract Testing in Action: With Pact, Pactflow, and Github Actions

No customer reviews yet ISBN 9781633437241 Manning

Contract testing is a simple, reliable way to make sure that each service and API plays nice with other components so you can deploy independently and safely.

Large, loosely coupled systems have hundreds, even thousands, of interactions--and traditional testing can often struggle to keep up! Enter contract testing. This rapidly growing new approach checks API and service compatibility by verifying it against an agreed contract. No more unexpected integration issues, and no more breaking things in production!

In Contract Testing in Action you'll learn:

- The core concepts and practices of contract testing
- Testing microservices with Pact
- Consumer-driven and bi-directional testing
- Building a contract testing framework
- Converting API integration tests to contract tests

Contract Testing in Action introduces the practice of contract testing through engaging hands-on examples. You'll learn how to introduce contract tests for multiple different types of communication, from REST APIs to event-driven architecture. By the end of this practical guide, you'll be comfortable with advanced contract testing concepts like can-i-deploy, provider states, and webhooks. You'll even get tips on how to introduce contract testing to your team and other business stakeholders.

Purchase of the print book includes a free eBook in PDF and ePub formats from Manning Publications.

About the technology

It's difficult to test API and event-based services that can be used by many applications simultaneously through a complex network of integrations. Contract testing offers a straightforward solution. API and service compatibility are verified against agreed-upon contracts that each component in the system--and the developers that build them--can understand and respect. This transformative technique helps uncover integration issues early and adds vital transparency to any system.

About the book

Contract Testing in Action makes it easy for your team to adopt contract testing for microservices and other API-centric systems. You'll start by learning how contract testing fits into the software development lifecycle, and then you'll explore practical methods to integrate it with your own tech stack and practices. You'll use leading contract testing tools--including Pact, PactFlow, and GitHub Actions--to build your own contract testing framework, set up consumer-driven contract testing for REST and GraphQL APIs, and integrate it into your CI/CD pipeline.

What's inside

- Testing microservices with Pact
- Consumer-driven and bi-directional contract testing
- Building a contract testing framework
- Converting API integration tests to contract tests

About the reader

For software developers and quality engineers who have worked with Java or JavaScript, and APIs.

About the author

Marie Cruz is a Software Tester with over ten years of experience and also a Developer Advocate at Grafana Labs. Lewis Prescott is a Test Specialist at IBM with over nine years experience in software testing.

Table of Contents

Part 1
1 Introduction to contract testing
2 How contract testing fits into wider testing concepts
3 A technical overview of contract testing
Part 2
4 Implementing consumer-driven contract testing for web applications
5 Implementing consumer-driven contract testing for mobile clients
6 Implementing consumer-driven provider contract tests
7 Contract testing for GraphQL
8 Contract testing for event-driven architecture
9 Storing, hosting, and securing the contracts
10 Setting up contract testing in a CI/CD pipeline
Part 3
11 Implementing provider-driven contract testing
12 Moving integration tests to contract tests
Appendix A Tool comparisons
Appendix B Setting up project requirements for consumer contract testing (web applications)
Appendix C Answers to chapter exercises

About the author

Product details

BrandManning
Pub dateDec 31, 2024
ISBN-101633437248
ISBN-139781633437241
LanguageEnglish
Dimensions9.25 × 0.8 × 7.38 in
Weight1 lb
Last updated 2026-01-31 20:40
$55.74 $59.99 7% off
You save $4.25 · list price $59.99
Only 1 left in stock — order soon
Delivery by Monday, September 14, 2026
Qty
Sign in to Add to Saved list
Free delivery on orders over $35.
15-day returns. Any reason.
Secure checkout. We never store card details.

Readers who bought this also bought

More from Computers | Software Development & Engineering | Quality Assurance & Testing
See all
Managing Trade-Offs in Adaptable Software Architectures
<p><i>Managing Trade-Offs in Adaptable Software Architectures </i>explores the latest research on adapting large complex systems to changing requirements. To be able to adapt a system, engineers must evaluate different quality attributes, including trade-offs to balance functional and quality requirements to maintain a well-functioning system throughout the lifetime of the system.</p> <p>This comprehensive resource brings together research focusing on how to manage trade-offs and architect adaptive systems in different business contexts. It presents state-of-the-art techniques, methodologies, tools, best practices, and guidelines for developing adaptive systems, and offers guidance for future software engineering research and practice. </p> <p>Each contributed chapter considers the practical application of the topic through case studies, experiments, empirical validation, or systematic comparisons with other approaches already in practice. Topics of interest include, but are not limited to, how to architect a system for adaptability, software architecture for self-adaptive systems, understanding and balancing the trade-offs involved, architectural patterns for self-adaptive systems, how quality attributes are exhibited by the architecture of the system, how to connect the quality of a software architecture to system architecture or other system considerations, and more.</p>
$138.90