
Discover contract testing with Pact to validate microservices communication, place contract tests in the unit testing layer of the test pyramid, and learn to set up pact-based tests and environments.
Explore the differences between monolithic and microservices architectures. See how monoliths centralize code and database, while microservices enable loose coupling, independent databases, and isolated deployments for each business function.
Explore how microservices communicate using REST calls and API calls, examine monolithic vs distributed architectures, and uncover integration testing challenges and pact-based contract testing.
Explore why microservices demand dedicated integration testing in an agile world, contrast with monolithic testing, and introduce Pact as a tool to catch contract breaks before deployment.
Discover how pact contract testing catches provider changes early by recording consumer expectations in a json contract file and validating against the real provider. Automates cross-team contract monitoring with pact.
Learn to set up two Spring Boot microservices locally, configure databases, run on separate ports, and prepare contract tests with Pact JVM using isolated unit tests.
Install pact dependencies from the official pact JVM site, use the latest 4.2.x for Java 11, and configure Maven with JUnit 5 and Spring Boot test extension for contract testing.
Define pact server configuration and interactions with responses, using pact annotations in a spring boot project to unit test consumer tests against a mock provider.
Learn to unit test with a Pact server by mocking external calls, generating a contract json file, and validating the expected json against the actual response.
Configure pact on the provider side by importing the consumer-generated contract json into the provider, placing it in the packs folder, and running provider tests to validate the contract.
Configure pact provider side tests using a context to verify contract interactions against a real Spring Boot server, starting the server, binding ports, and directing tests via a test target.
Define state change actions to set up and tear down test data for pact consumer contract tests, ensuring pre and post request conditions and at least two course items.
Explore how pact contract tests reveal failures when a provider changes the API response contract. Mismatches in minimum items or data types trigger failures, enabling early collaboration before code pushes.
Learn how Pact contract testing validates only the fields you consume, such as price, avoiding breaks when unused fields change.
Develop consumer side unit tests with Pact's mock server to generate a contract file, mocking get product details by name and validating two interactions before provider side verification.
Update provider states for each interaction and run provider-side unit tests with pact to automatically verify contract interactions, including get course details and 404 not found in negative scenarios.
Build pact server configurations for negative scenarios, simulating 404 not found when data is missing and validating consumer and provider contract tests with state changes.
Learn how to update provider state for Pact contract testing, manage database interactions with Spring Boot JPA, and design pre and post request interactions with mock responses to validate contracts.
Discover how Pact Flow functions as a broker between consumer and provider, centralizing contract files on a Pact Flow server and access via a unique URL and tokens.
Publish your consumer contract to pact flow using a Maven plugin, configuring the pact broker URL and token, then run the pact publish goal to upload and review interactions.
Learn how to retrieve contracts from Pact Flow using Pact Broker on the provider repo, configure authentication with a token, and run tests against the latest contracts.
" Contract Testing " is one of the most buzzing word in the Software Industry especially in the projects which relies heavily on Microservices Architecture.
Contract testing is the Modern way of testing communication/Contract between two any Systems (Such as Microservice, Angular NodeJS, Java Apps). In Agile world, Contract Testing is heavily used in the bottom of the Test Pyramid to identify the bugs in early development cycle.
***For More details, Please watch Preview lectures of this course to get detail understanding of how and Why Contract Testing****
In this course, We shall be using Pact Contract testing tool (Java Library) to test the inter communication contract between Microservices
What this Course offers?
This course helps you to understand all the concepts revolving around Contract testing first to make you realize the importance of having these tests in the Projects
And then introduces the Contract testing tool called Pact and gets deep dive into writing Consumer & Provider driven Contract tests to test Microservices Inter communication.
I will also show you different helper orchestrator tools available such as Pactflow to centrally manage Contract files across the Projects.
On course completion, You will have thorough understanding of how Microservices communication works internally and how can we test this communication using Pact Contract Testing tool.