Skip to content

A sample project for my blog post "", where I show how to create write contract tests for an asynchronous messaging architecture with πŸ“πŸ€ Pact, Junit 5 and MockK πŸ“πŸ€.

License

Notifications You must be signed in to change notification settings

chicio/Contract-Testing-Asynchronous-Messaging-Pact

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

12 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Contract Testing Asynchronous Messaging with Pact and MockK

GitHub license

A sample project for my blog post Contract testing asynchronous messaging with Pact and MockK, where I show how to create write contract tests for an asynchronous messaging architecture with Pact and MockK.

Description

This is a quote from the post:

...In the last weeks I worked with my colleague Felice Giovinazzo on a new feature for the refund process (as may already know from some of my previous posts in the last 2 years I worked mainly on backend applications). In this new feature we have a messaging-based communication between microservices. The messaging system used is RabbitMQ. In lastminute.com group we are already using Pact to implement contract testing for the classic RESTful interaction between microservices...

Click on the link above to read the posts.

How to

If you wanna try the example in this repository you just have to:

  • start the pact broker by launching the following commands:
cd pact-broker
docker-compose up
  • execute the test of the AccountService consumer and publish the contract with the following maven command:
mvn pact:publish
  • execute the test of the RefundService producer to verify the pact published

About

A sample project for my blog post "", where I show how to create write contract tests for an asynchronous messaging architecture with πŸ“πŸ€ Pact, Junit 5 and MockK πŸ“πŸ€.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages