-<span class="mx-1 text-dark-50 fw-300">|</span> <a href=https://github.com/microcks/microcks.io/edit/master/content/documentation/explanations/conformance-testing.md class="f6 ph3 pv1 br2 dib tc ttu mv3 bg-primary-color white hover-bg-green link">Improve this page</a></span><div class="doc-content mt-4 pt-4" data-bs-spy=scroll data-bs-target=#TableOfContents data-bs-offset=20><h2 id=introduction>Introduction</h2><p>You may have experienced the frustration of deploying to production, only to discover that an API or service you integrate with has broken its contract. How can we effectively ensure this does not happen?</p><p>As introduced in <a href=/documentation/overview/main-concepts>Main Concepts</a>, Microcks can be used for <strong>Contract conformance testing</strong> of API or services under development. You spend a lot of time describing request/response pairs and matching rules: it would be a shame not to use this sample as test cases once development is underway!</p><p>On the internet, you can find many different representations of how the different testing techniques relate to one another and should ideally be combined into a robust testing pipeline. At Microcks, we particularly like the Watirmelon representation below. Microcks enables you to automate <strong>Automated API Tests</strong> and focus specifically on <strong>Contract conformance testing</strong>.</p><br><div align=center><img alt="Ideal Software Testing Pyrami" src=https://miro.medium.com/max/1400/0*f2vFclaitRRo1w2i.jpg style=max-width:70%;border-color:#ddd;border-style:solid!important></div><br><p>The purpose of Microcks tests is precisely to check that the <strong>Interaction Contract</strong> - as represented by an OpenAPI or AsyncAPI specification, a Postman collection or whatever <a href=/documentation/references/artifacts>supported Artifact</a> - consumer and producer agreed upon is actually respected by the API provider. In other words, to check that an implementation of the API is conformant to its contract.</p><blockquote><p>💡 If you want to learn more about this topic and get into the details on <strong>how Microcks is different from other contract-testing or conformance testing solutions</strong>, we’ve got you covered! We recommend having a read of this two articles: <a href=https://medium.com/@lbroudoux/microcks-and-pact-for-api-contract-testing-3e0e7d4516ca target=_blank>Microcks and Pact for API contract testing</a> and <a href=https://medium.com/@lbroudoux/different-levels-of-api-contract-testing-with-microcks-ccc0847f8c97 target=_blank>Different levels of API contract testing with Microcks</a></p></blockquote><h2 id=conformance-metrics>Conformance metrics</h2><p>In order to help you get confidence in your implementations, we developed the <strong>Conformance index</strong> and <strong>Conformance score</strong> metrics that you can see on the top right of each API | Service details page:</p><br><a href=/images/documentation/test-conformance.png style=display:block class=glightbox><img title loading=lazy decoding=async class=img width=2802 height=846 src=/images/documentation/test-conformance_hue4ee572963f6328ddf8c45d038e52e92_171737_2802x846_resize_q90_h2_lanczos_3.webp alt=image onerror='this.onerror="null",this.src="/images/documentation/test-conformance_hue4ee572963f6328ddf8c45d038e52e92_171737_2802x846_resize_lanczos_3.png"'>
0 commit comments