New Module in WireMock Cloud: Contract Testing for Mock APIs
Blog post from WireMock
WireMock Cloud offers a solution to the common issue of API drift by introducing a contract testing module that ensures mock APIs remain in sync with their real-world counterparts. By using an OpenAPI specification as the foundational contract, WireMock Cloud can validate mock APIs against live APIs, detecting and reporting any discrepancies that arise due to changes in API requirements or development lifecycle shifts. This is achieved by capturing HTTP traffic and comparing it to the OpenAPI spec, thus identifying errors in both client requests and mock responses. WireMock’s features, such as recording and OpenAPI to mock generation, facilitate the automatic updating of mock APIs to align with actual APIs. The platform offers two validation modes: soft validation, which reports drift warnings, and hard validation, which blocks requests that do not match the specification, thus preventing potential downstream issues. This approach not only aids in maintaining the accuracy of API interactions but also saves teams time in troubleshooting and aligns them on consistent API contracts.
No tracked trend matches for this post yet.