{"id":460,"date":"2025-04-29T13:51:30","date_gmt":"2025-04-29T11:51:30","guid":{"rendered":"https:\/\/www.mockinarium.com\/?p=460"},"modified":"2025-05-04T21:49:07","modified_gmt":"2025-05-04T19:49:07","slug":"precision-mocking-mastering-matching-options","status":"publish","type":"post","link":"https:\/\/www.mockinarium.com\/index.php\/2025\/04\/29\/precision-mocking-mastering-matching-options\/","title":{"rendered":"Precision Mocking: Mastering Matching Options"},"content":{"rendered":"\n<p class=\"has-drop-cap\">Mocking API responses isn&#8217;t just about faking data\u2014it\u2019s about precision. With MOCKinarium\u2019s matching options, you can fine-tune request matching to simulate real-world API behavior with accuracy.<\/p>\n\n\n\n<p>Here\u2019s how matching options give you full control over your mock scenarios:<\/p>\n\n\n\n<p>\u2705 <strong>EQUAL_TO<\/strong>: Ensure an exact match between incoming requests and predefined values.<\/p>\n\n\n\n<p><br>Perfect for strict API validation.<br><br><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-rt.googleusercontent.com\/docsz\/AD_4nXdy5Afu-80EghZcEzJdOoSMqfWV9z-P7hoj9bGuqzaIsnv9pVSENQXZTSHBctMIhMkaOUF32RRr8UtnqngtTB3g5RJqVbrpne8kcztlxIQfVNXFB4tfZV9c9Z55YwgCO9c5S6zFZg?key=ZlThcyY7aXDdUWylRGjpyVy7\" alt=\"\"\/><\/figure>\n\n\n\n<p>\ud83d\udd0d <strong>CONTAINS<\/strong>: Match requests that include a specific substring, great for flexible parameter handling.<img decoding=\"async\" src=\"https:\/\/lh7-rt.googleusercontent.com\/docsz\/AD_4nXdAcUoksIMNBEs4TxOlaIae_qPO_qO9b--Knv_GSB5-yXaM9mllMSYrj0itmutnN1k3MYnpwYVsVReLTORrhRay8GnDSTfmSuaUAQc2KCrnygMBt0gm0izKxH0B01AO-9Pr8J_3?key=ZlThcyY7aXDdUWylRGjpyVy7\" width=\"919.8869475847893\" height=\"149.37836201473544\"><\/p>\n\n\n\n<p>\ud83c\udfad <strong>MATCHES<\/strong>: Use regular expressions to define dynamic patterns, making it easy to handle variations in request formats.<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/lh7-rt.googleusercontent.com\/docsz\/AD_4nXfCf4bBfMpjn4FNpObFut8fCF1GWfa8_OWJ7jqAQC7aQjUakVVDVbg3VEqWrhbTUFrmapir9GZuTMsEsMKe05_sGmnEqaoYZmaZQZtMncRgeILUtqDVjlBEgH_2Z1uXCTClAfhfeA?key=ZlThcyY7aXDdUWylRGjpyVy7\" width=\"889\" height=\"157\"><\/p>\n\n\n\n<p>\ud83d\udeab <strong>NOT_EQUAL_TO, NOT_CONTAINS, NOT_MATCHES<\/strong>: Exclude unwanted values or patterns, ensuring your mock tests catch edge cases.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-rt.googleusercontent.com\/docsz\/AD_4nXctpfMPXrjgDhu2liRBssHtfNcEH723StJeew4AprozivHdXuGhQlGWZviVB3uSpUOVemExNnRFUwTxj-yDaoBfdcX3pqzXgh77oVzUEVW1sJ78zp-bVJBGNkO29hTGulMxzk8i7A?key=ZlThcyY7aXDdUWylRGjpyVy7\" alt=\"\"\/><\/figure>\n\n\n\n<p>\u274c <strong>ABSENT &amp; PRESENT<\/strong>: Validate scenarios where a parameter must be missing or explicitly included.<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/lh7-rt.googleusercontent.com\/docsz\/AD_4nXdHISICmFHRHYZCDr2l3gQ98NQaavhtfdPlxKbMNReGVd7SHcFNvpfzoeXpP79ePDqRH3D2DH9CKEuU5vSV8XOvERE0bzxnctQCZnyzwdhVfMFdE3DvWCIedFBY08QUPAbdgiv7?key=ZlThcyY7aXDdUWylRGjpyVy7\" width=\"602\" height=\"148\"><\/p>\n\n\n\n<p>With these options, you can create API mocks that react just like a real backend\u2014handling different inputs, edge cases, and dynamic requests effortlessly.<\/p>\n\n\n\n<p>Fine-tune your tests, eliminate guesswork, and build with confidence!&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Mocking API responses isn&#8217;t just about faking data\u2014it\u2019s about precision. With MOCKinarium\u2019s matching options, you can fine-tune request matching to simulate real-world API behavior with accuracy. Here\u2019s how matching options give you full control over your mock scenarios: \u2705 EQUAL_TO: Ensure an exact match between incoming requests and predefined values. Perfect for strict API validation. [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-460","post","type-post","status-publish","format-standard","hentry","category-matching-options"],"_links":{"self":[{"href":"https:\/\/www.mockinarium.com\/index.php\/wp-json\/wp\/v2\/posts\/460","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mockinarium.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mockinarium.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mockinarium.com\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mockinarium.com\/index.php\/wp-json\/wp\/v2\/comments?post=460"}],"version-history":[{"count":1,"href":"https:\/\/www.mockinarium.com\/index.php\/wp-json\/wp\/v2\/posts\/460\/revisions"}],"predecessor-version":[{"id":461,"href":"https:\/\/www.mockinarium.com\/index.php\/wp-json\/wp\/v2\/posts\/460\/revisions\/461"}],"wp:attachment":[{"href":"https:\/\/www.mockinarium.com\/index.php\/wp-json\/wp\/v2\/media?parent=460"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mockinarium.com\/index.php\/wp-json\/wp\/v2\/categories?post=460"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mockinarium.com\/index.php\/wp-json\/wp\/v2\/tags?post=460"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}