Year: 2025
Type: conference-paper
Abstract: Mocks are a common strategy to reduce flakiness and complexity in automated testing. API mocks, which intercept communications with external services, must align with the actual implementation to ensure realistic test scenarios. However, current solutions for TypeScript API mocking do not adequately support testers in declaring compliant API mocks. In this paper, we introduce Zimic, a novel approach to TypeScript API mocking that enhances compliance through static validation and test abstractions. We evaluated Zimic in two empirical studies involving students and professional testers. Our results show that Zimic improves mock compliance by 24.1%, test completeness by 27.2%, and readability by 15.1% compared to existing solutions.
Authors: Diego C. de Aquino, Everton L. G. Alves
Institution: Universidade Federal de Campina Grande
Language: English
Subfield: Software
Field: Computer Science
Domain: Physical Sciences
Open Access status: gold
OpenAlex ID: W4414348128
