Articles
| Open Access | A FRAMEWORK FOR ASSURING INTER-SERVICE RELIABILITY IN DISTRIBUTED ARCHITECTURES: CONSUMER-DRIVEN CONTRACT TESTING WITH PACT
Ayu Puspita Sari , Faculty of Computer Science, Universitas Indonesia, Depok, Indonesia Nguyen Van Hoang , Nguyen Van Hoang Department of Software Engineering, FPT University, Hanoi, VietnamAbstract
Purpose: The migration to microservices has substantially enhanced agility but simultaneously introduced critical complexities in managing inter-service communication and maintaining system-wide reliability. Traditional integration and End-to-End (E2E) testing are often too slow, brittle, and resource-intensive for continuous delivery pipelines. This article systematically examines Consumer-Driven Contract (CDC) testing, specifically through the implementation of the PACT framework, as a paradigm-shifting solution to assure inter-service reliability in distributed architectures.
Methodology: This paper develops a comprehensive theoretical framework for CDC and analyzes its technical workflow, focusing on artifact generation, mock service behavior, and provider verification. A conceptual comparative analysis is employed to contrast the PACT-based CDC approach against conventional testing strategies, utilizing key performance indicators such as pipeline execution time, integration defect leakage, and deployment frequency as metrics for success. We conduct a deep dive into the systemic role of the Pact Broker in governing contract evolution and enabling organizational autonomy.
Findings: CDC testing, particularly when formalized with PACT, is associated with a significant shift-left of integration defect discovery, leading to demonstrably faster and more stable CI/CD pipelines. The mechanism facilitates the independent evolution of services by establishing a machine-readable, shared understanding of the API interface. Crucially, the approach mitigates the coordination overhead and infrastructural cost associated with E2E environments.
Originality: This work contributes an academic synthesis of PACT's integration into the full development lifecycle, highlighting its capacity to enable high-velocity, high-assurance distributed systems, and identifying key future research avenues, including the integration of AI-driven tools.
Keywords
Consumer-Driven Contracts, Contract Testing, Microservices, Distributed Systems
References
PACT Foundation, “Pact Documentation.” [Online]. Available: https://docs.pact.io
Spring Cloud Team, “Spring Cloud Contract Reference Documentation.” [Online]. Available: https://cloud.spring.io/spring-cloud-contract/
Sagar Kesarpu. (2025). Contract Testing with PACT: Ensuring Reliable API Interactions in Distributed Systems. The American Journal of Engineering and Technology, 7(06), 14–23. https://doi.org/10.37547/tajet/Volume07Issue06-03
Postman Inc., “Postman API Platform.” [Online]. Available: https://www.postman.com/
M. Fowler, “Microservice Testing Strategies,” MartinFowler.com, 2018. [Online]. Available: https://martinfowler.com/articles/microservice-testing/
S. Newman, Building Microservices, 2nd ed. O’Reilly Media, 2021.
ThoughtWorks, “Technology Radar Vol. 26,” 2022. [Online]. Available: https://www.thoughtworks.com/radar
Pactflow, “Secure, Scalable Contract Testing.” [Online]. Available: https://pactflow.io/
T. Richardson and B. Abbott, “Contract Testing: A Best Practice Guide,” InfoQ, 2022. [Online]. Available: https://www.infoq.com/articles/contract-testing-guide/
Nagaraj, V. (2025). Ensuring low-power design verification in semiconductor architectures. Journal of Information Systems Engineering and Management, 10(45s), 703–722. https://doi.org/10.52783/jisem.v10i45s.8903
GitHub, “Using the Pact CLI in GitHub CI.” [Online]. Available: https://github.com/pact-foundation/pact-js/blob/master/docs/ci/github.md
D. Taibi, V. Lenarduzzi, and C. Pahl, “Processes, Motivations, and Issues for Migrating to Microservices Architectures: An Empirical Investigation,” IEEE Cloud Computing, vol. 4, no. 5, pp. 22–32, Sept./Oct. 2017.
Chandra Jha, A. (2025). VXLAN/BGP EVPN for Trading: Multicast Scaling Challenges for Trading Colocations. International Journal of Computational and Experimental Science and Engineering, 11(3). https://doi.org/10.22399/ijcesen.3478
Article Statistics
Downloads
Copyright License
Copyright (c) 2025 Ayu Puspita Sari, Nguyen Van Hoang

This work is licensed under a Creative Commons Attribution 4.0 International License.