Contract testing is a great technique that provides a reliable way to verify the agreed boundaries between your microservices without all the complexity of integration testing.
It has some steep learning curve though. The following post covers some of the technical challenges my team had to overcome when introducing the Pact-based contract testing into our Java microservices world.
Let’s have a look at an example of JSON structure specified using different JVM DSLs. I’m going to use a product definition you might find in a typical warehouse system, with the following…
Have you ever verified your integration with an external service using a mocked response, only to realize later that things work quite differently in a production environment? If only you knew some approach to ensure mocks are just fine and up to date, right?
Cue contract testing to the rescue!
Distributed systems these days are complex, there’s no doubt about that. With more and more moving parts — new services being created, old services being deprecated, new API versions published, or existing API versions being extended — it’s difficult to keep up with the changes. …
Learn how to make the best out of contract testing by using Pact Broker and
can-i-deploy tools in your build & deployment pipelines.
The Pact Broker is an open-source tool that allows you to share your pacts and store the results of their verification. You may treat it as a repository of your published contracts together with their testing report.
In order to see your pact on Pact Broker pages, you need to publish it first. Pact contract testing follows the consumer-driven approach, which means it’s the consumer who creates a contract defining new requirements against the provider API.
As a part of her build — optionally for feature branches and, ideally, always for the main branch— the consumer runs tests that create pacts (i.e. using Groovy DSL), and later triggers their publication to Pact Broker. …
Code review has become an essential practice for many programmers. It comes with a variety of great outcomes, just to name a few:
But the question is, what makes a great code reviewer? How to conduct a review to make the best out of it?
Even though code reviews are widely used in almost all IT companies these days, there are some do’s and don’ts I find not so popular. In the following sections I gathered the best and worst practices I’ve seen in my day-to-day…