Introduction to API Contract Testing in Microservices with Pact

person icon Lewis Prescott

Introduction to API Contract Testing in Microservices with Pact

Learn the basics of how to implement API Consumer Driven Contract Testing with Pact (JavaScript, .Net Core)

updated on icon Updated on Sep, 2023

language icon Language - English

person icon Lewis Prescott

architecture icon Microservices,Development,Software Testing


30-days Money-Back Guarantee

Training 5 or more people ?

Get your team access to 19,000+ top Tutorialspoint courses anytime, anywhere.

Course Description

Want to take your API tests to the next level? Want to deploy apps with more confidence and move to continuous deployment? Then you are in the right place, contract testing is for you. Working in a Microservices architecture? Tired of problems in your integration environments, the long process of waiting for API changes to be deployed to integration for testing.

Ask yourself these questions: 

1. Are your API integration tests slow and provide feedback too late causing delays to your release?

2. Do your integration tests fail due to environment and data issues?

3. Does changes to other teams API service cause your tests to fail?

Learn how to write a full End to End API Contract Test with Pact and setup the Pact Broker in Docker!

Things you will learn:

  • Consumer contract testing using Pact-JS

  • Provider contract testing using PactNet

  • Pact Broker Setup with Docker

  • Publish Pact Contracts using Postman and Pact-JS

  • Can I Deploy using Pact Broker Client

Introduce contract testing to your test suite, for these benefits and much more: 

  • Open communication between Microservices

  • Faster feedback

  • Less integration issues

  • Visualise consumers

  • Versioning made easy

Curated and Directed by Course Instructor from Test Automation University.


What will you learn in this course:

  • Understand API Contract Testing when testing Microservices
  • How to write a Consumer Driven Contract Test using pact-js
  • How to write a Provider Contract Test using PactNet
  • How to Setup Pact Broker using Docker


What are the prerequisites for this course?

  • Basic programming skills (JavaScript, C#)

  • Basic knowledge of Docker (docker-compose)

Introduction to API Contract Testing in Microservices with Pact


Check out the detailed breakdown of what’s inside the course

1 Lectures
  • play icon Consumer Driven Contract Testing 04:37 04:37
Consumer Tests
4 Lectures
Pact Broker
1 Lectures
Provider Tests
3 Lectures
Can I Deploy
3 Lectures

Instructor Details

Lewis Prescott

Lewis Prescott

API Contract Testing Expert

I'm an experienced QA Lead at Cera Care (one of Europe’s fastest-growing companies), having worked across different industries including Healthcare, Non-profit, Retail and PropTech.
Working for companies such as ASOS during Black Friday sales mayhem, Zava delivering a safe and secure medical service to patients and Cancer Research UK enabling scientists to save lives through technology.
I am a course author on Test Automation University & Udemy, sharing my knowledge is a passion of mine.

Course Certificate

User your certification to make a career change or to advance in your current career. Salaries are among the highest in the world.

sample Tutorialspoint certificate

Our students work
with the Best

Related Video Courses

View More

Annual Membership

Become a valued member of Tutorials Point and enjoy unlimited access to our vast library of top-rated Video Courses

Subscribe now
People having fun around a laptop

Online Certifications

Master prominent technologies at full length and become a valued certified professional.

Explore Now
People having fun around a laptop

Talk to us