Learn How You Can Enhance The Backend Microservices Ecosystem with Contract Testing by Subhash Kotra | Spartans Summit 2024

Join Subhash Kotra, QA Automation Lead at Tide, in this session to explore the transformative potential of contract testing.

Whether you’re a seasoned microservices architect or a curious developer, you’ll leave with actionable insights to enhance the reliability and agility of your backend microservices infrastructure.

Let’s empower the microservices with the strength of contracts, revolutionizing how we design, develop, and deploy in this ever-evolving domain.

Still not registered? Hurry up and grab your free tickets: Register Now!

If you have registered and are up for the session, please post your questions in the thread below. :point_down:

Here are some of the questions poured in from the attendees:

How do you suggest handling cases where the API call to the provider is being made via a common library that is used in multiple services/consumers? Are there ways to avoid repeating the same test in all the consumers?

As a beginner, what are the initial steps or resources you recommend for starting with contract testing?

Can you recommend key tools or frameworks for implementing contract testing in microservices?

Please give suggestions on how to start with API testing for beginners.

What’s the difference between contract testing and schema validations between consumer and provider?

What are the benefits of contract testing compared to traditional integration testing methodologies?

Testing Across Versions: Testing becomes more complex when multiple versions of Microservices run concurrently. How do we tackle such cases as it is very challenging when there are several services.

How can we ensure contract tests remain relevant and up-to-date as microservices evolve?

How can contract testing help identify performance bottlenecks or scalability issues in microservices?

What’s one piece of advice you would give us to get started with contract testing in microservices?

Is Contract Testing the same as End-to-End Testing?

Subhash: Start with online tutorials and Pact or Spring Cloud Contract documentation, depending on your tech stack. Experimenting with simple example projects can also be very insightful.

Subhash: In such cases, it’s efficient to centralize your contract tests within the standard library itself. This approach avoids repetition and ensures consistency across all consuming services.

Subhash: I recommend Pact for its comprehensive support across languages and Spring Cloud Contract for Spring ecosystem users. These tools are robust for implementing contract testing in microservices.

As a quality team member, how can we implement this in our organization if you give some process steps that help us? How can we start from the root?

Subhash: Establish a clear understanding of contract testing within your team. Then, select a small, manageable project to implement as a pilot and gradually expand as your team gains confidence and expertise.

Hi there,

In case you missed the live session, no problem at all! You can check out the recording right here:

Additionally, we’ve got you covered with a detailed session blog:


Contract testing brings significant benefits when compared to traditional integration testing methodologies. Firstly, it excels in isolating microservices, allowing each service to independently verify and validate its interactions with others. This autonomy is crucial in a microservices architecture, where dependencies can complicate the testing process. Contract testing enables the early detection of issues by focusing on testing contracts between services independently.

This approach facilitates the identification and resolution of problems before the integration phase, leading to more efficient development workflows. Additionally, contract testing supports the evolution of services independently, providing developers with the confidence to make changes without disrupting the entire system.

Absolutely! Testing in an environment with multiple versions of microservices concurrently running poses a formidable challenge, demanding a strategic approach to maintain reliability and functionality.

So, employing service virtualization allows for the simulation of interactions with dependent services, enabling isolated testing of microservices without reliance on the actual implementations. Contract testing ensures smooth communication between different versions by validating agreed-upon interfaces, establishing a stable foundation for compatibility. Clear versioning policies and backward compatibility minimize disruptions, while separate testing environments and parallel testing enable comprehensive validation across various microservice versions.

Automated regression testing becomes pivotal, providing a safety net against unintended consequences, and continuous monitoring detects anomalies arising from concurrent versions. Implementing rollout strategies, such as canary releases, and fostering transparent communication among teams are crucial elements.