{"id":3903,"date":"2016-12-16T10:37:09","date_gmt":"2016-12-16T05:07:09","guid":{"rendered":"https:\/\/www.botreetechnologies.com\/blog\/?p=3903"},"modified":"2023-02-16T16:04:12","modified_gmt":"2023-02-16T10:34:12","slug":"part-1-mock-microservices-to-speedup-development","status":"publish","type":"post","link":"https:\/\/www.botreetechnologies.com\/blog\/part-1-mock-microservices-to-speedup-development\/","title":{"rendered":"Part 1: Mock Microservices To Speedup Development"},"content":{"rendered":"\n<p>The microservices based architecture is an obvious choice for large applications in modern times. Such microservices are integrated in some fashion to achieve bigger business goal of the software. Automated tests play very important role for integration and acceptance testing while building such services.<\/p>\n\n\n\n<p>In order to tests integrations, we generally mock external services for:<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Running the tests faster<\/h2>\n\n\n\n<p>&#8211; Mocking services greatly improves productivity<br>&#8211; Mocking services helps developer wondering and loosing focus while running the tests<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Substituting unavailable services<\/h3>\n\n\n\n<p>&#8211; Either the service is not written at all or<br>&#8211; It is down for some reason<\/p>\n\n\n\n<p>Generally, developers tend to create a small web application(rails or sinatra) to simulate responses, error conditions, special cases etc. for the API. But there are difficulties in the approach when there are lots of business rules and large team. <\/p>\n\n\n\n<p>Mocking such APIs makes life difficult to address the business rules and maintain the mock application the service. Also, Fronted and Mobile team might not know how to write server application to mock API.<\/p>\n\n\n\n<p>We have distributed teams working of different microservices of a large content marketplace application. One team is working developing a custom REST API plugin in wordpress for marketplace and my team is developing consumer microservice for that service. Now, the wordpress team&#8217;s sprint is running behind time and we wanted to deliver our sprints on time.<\/p>\n\n\n\n<p>We had a clear spec for the REST APIs and so we decided to go and start application to mock the wordpress service to keep sprints running. We have decided not to write rails\/sinatra apps to mock APIs. Luckily we have got an opensource mock server&nbsp;<a href=\"http:\/\/www.mbtest.org\/\" target=\"_blank\" rel=\"noopener noreferrer\">Montebank<\/a>&nbsp;built by ThoughtWorks.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>Montebank is an open source tool to provide cross-platform, multi-protocol test doubles over the wire.<\/p>\n<\/blockquote>\n\n\n\n<p>In&nbsp;<a href=\"https:\/\/www.botreetechnologies.com\/blog\/part-2-mocking-a-restful-microservice-in-mountebank\" target=\"_blank\" rel=\"noopener noreferrer\">Part 2<\/a>&nbsp;of this story, I will demonstrate how we can easily configure mock server and mostly not writing any code.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity\"\/>\n\n\n\n<p><i>At&nbsp;<a href=\"https:\/\/www.botreetechnologies.com\/\" target=\"_blank\" rel=\"noopener noreferrer\"><b>BoTree Technologies<\/b><\/a>, we build web and&nbsp;mobile applications&nbsp;to add value to our client\u2019s business. We align ourselves to ensure that our client benefits the most out of our engagement.<\/i><\/p>\n\n\n\n<p><i>We work in\u00a0<a href=\"https:\/\/www.botreetechnologies.com\/ruby-on-rails-development\" target=\"_blank\" rel=\"noreferrer noopener\">Ruby on Rails<\/a>,\u00a0<a href=\"https:\/\/www.botreetechnologies.com\/python\" target=\"_blank\" rel=\"noopener noreferrer\">Python<\/a>, Java,\u00a0<a href=\"https:\/\/www.botreetechnologies.com\/react-native-development\" target=\"_blank\" rel=\"noopener noreferrer\">React<\/a>, Android, iOS and\u00a0<a href=\"https:\/\/www.botreetechnologies.com\/robotic-process-automation\" target=\"_blank\" rel=\"noopener noreferrer\">RPA<\/a>\u00a0as well.<\/i><\/p>\n\n\n\n<p><i><a href=\"https:\/\/www.botreetechnologies.com\/contact\" target=\"_blank\" rel=\"noopener noreferrer\">Drop us a line<\/a>&nbsp;to discuss how can we help take your business to the next level.<\/i><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The microservices based architecture is an obvious choice for large&#8230;<\/p>\n","protected":false},"author":3,"featured_media":13760,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,57],"tags":[],"class_list":["post-3903","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-development","category-web-development"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Part 1: Mock Microservices To Speedup Development<\/title>\n<meta name=\"description\" content=\"The microservices based architecture is an obvious choice for large applications in modern times. Such microservices are integrated in some fashion to achieve bigger business goal of the software.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.botreetechnologies.com\/blog\/part-1-mock-microservices-to-speedup-development\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Part 1: Mock Microservices To Speedup Development\" \/>\n<meta property=\"og:description\" content=\"The microservices based architecture is an obvious choice for large applications in modern times. Such microservices are integrated in some fashion to achieve bigger business goal of the software.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.botreetechnologies.com\/blog\/part-1-mock-microservices-to-speedup-development\/\" \/>\n<meta property=\"og:site_name\" content=\"BoTree Technologies\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/BoTreeTechnologies\/\" \/>\n<meta property=\"article:published_time\" content=\"2016-12-16T05:07:09+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-02-16T10:34:12+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2016\/12\/Mock-Microservices-To-Speedup-Development-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1197\" \/>\n\t<meta property=\"og:image:height\" content=\"653\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Amit Patel\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@BoTreeTech\" \/>\n<meta name=\"twitter:site\" content=\"@BoTreeTech\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Amit Patel\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/part-1-mock-microservices-to-speedup-development\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/part-1-mock-microservices-to-speedup-development\/\"},\"author\":{\"name\":\"Amit Patel\",\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/#\/schema\/person\/86645099906a429b0c5ca4de2bf92c46\"},\"headline\":\"Part 1: Mock Microservices To Speedup Development\",\"datePublished\":\"2016-12-16T05:07:09+00:00\",\"dateModified\":\"2023-02-16T10:34:12+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/part-1-mock-microservices-to-speedup-development\/\"},\"wordCount\":392,\"commentCount\":1,\"image\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/part-1-mock-microservices-to-speedup-development\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2016\/12\/Mock-Microservices-To-Speedup-Development-1.png\",\"articleSection\":[\"Development\",\"Web Development\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.botreetechnologies.com\/blog\/part-1-mock-microservices-to-speedup-development\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/part-1-mock-microservices-to-speedup-development\/\",\"url\":\"https:\/\/www.botreetechnologies.com\/blog\/part-1-mock-microservices-to-speedup-development\/\",\"name\":\"Part 1: Mock Microservices To Speedup Development\",\"isPartOf\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/part-1-mock-microservices-to-speedup-development\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/part-1-mock-microservices-to-speedup-development\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2016\/12\/Mock-Microservices-To-Speedup-Development-1.png\",\"datePublished\":\"2016-12-16T05:07:09+00:00\",\"dateModified\":\"2023-02-16T10:34:12+00:00\",\"author\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/#\/schema\/person\/86645099906a429b0c5ca4de2bf92c46\"},\"description\":\"The microservices based architecture is an obvious choice for large applications in modern times. Such microservices are integrated in some fashion to achieve bigger business goal of the software.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/part-1-mock-microservices-to-speedup-development\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.botreetechnologies.com\/blog\/part-1-mock-microservices-to-speedup-development\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/part-1-mock-microservices-to-speedup-development\/#primaryimage\",\"url\":\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2016\/12\/Mock-Microservices-To-Speedup-Development-1.png\",\"contentUrl\":\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2016\/12\/Mock-Microservices-To-Speedup-Development-1.png\",\"width\":1197,\"height\":653,\"caption\":\"Mock Microservices To Speedup Development\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/part-1-mock-microservices-to-speedup-development\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.botreetechnologies.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Part 1: Mock Microservices To Speedup Development\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/#website\",\"url\":\"https:\/\/www.botreetechnologies.com\/blog\/\",\"name\":\"BoTree Technologies\",\"description\":\"Committed to inspire generation.\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.botreetechnologies.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/#\/schema\/person\/86645099906a429b0c5ca4de2bf92c46\",\"name\":\"Amit Patel\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/10\/amit-patel-1-150x150.png\",\"url\":\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/10\/amit-patel-1-150x150.png\",\"contentUrl\":\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/10\/amit-patel-1-150x150.png\",\"caption\":\"Amit Patel\"},\"description\":\"Amit is the COO and Co-founder of BoTree Technologies. He is a developer advocate and solution architect at the company. He has helped many SME and Large corporations digitize their business operations. He loves hanging out with friends and meditate.\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Part 1: Mock Microservices To Speedup Development","description":"The microservices based architecture is an obvious choice for large applications in modern times. Such microservices are integrated in some fashion to achieve bigger business goal of the software.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.botreetechnologies.com\/blog\/part-1-mock-microservices-to-speedup-development\/","og_locale":"en_US","og_type":"article","og_title":"Part 1: Mock Microservices To Speedup Development","og_description":"The microservices based architecture is an obvious choice for large applications in modern times. Such microservices are integrated in some fashion to achieve bigger business goal of the software.","og_url":"https:\/\/www.botreetechnologies.com\/blog\/part-1-mock-microservices-to-speedup-development\/","og_site_name":"BoTree Technologies","article_publisher":"https:\/\/www.facebook.com\/BoTreeTechnologies\/","article_published_time":"2016-12-16T05:07:09+00:00","article_modified_time":"2023-02-16T10:34:12+00:00","og_image":[{"width":1197,"height":653,"url":"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2016\/12\/Mock-Microservices-To-Speedup-Development-1.png","type":"image\/png"}],"author":"Amit Patel","twitter_card":"summary_large_image","twitter_creator":"@BoTreeTech","twitter_site":"@BoTreeTech","twitter_misc":{"Written by":"Amit Patel","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.botreetechnologies.com\/blog\/part-1-mock-microservices-to-speedup-development\/#article","isPartOf":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/part-1-mock-microservices-to-speedup-development\/"},"author":{"name":"Amit Patel","@id":"https:\/\/www.botreetechnologies.com\/blog\/#\/schema\/person\/86645099906a429b0c5ca4de2bf92c46"},"headline":"Part 1: Mock Microservices To Speedup Development","datePublished":"2016-12-16T05:07:09+00:00","dateModified":"2023-02-16T10:34:12+00:00","mainEntityOfPage":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/part-1-mock-microservices-to-speedup-development\/"},"wordCount":392,"commentCount":1,"image":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/part-1-mock-microservices-to-speedup-development\/#primaryimage"},"thumbnailUrl":"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2016\/12\/Mock-Microservices-To-Speedup-Development-1.png","articleSection":["Development","Web Development"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.botreetechnologies.com\/blog\/part-1-mock-microservices-to-speedup-development\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.botreetechnologies.com\/blog\/part-1-mock-microservices-to-speedup-development\/","url":"https:\/\/www.botreetechnologies.com\/blog\/part-1-mock-microservices-to-speedup-development\/","name":"Part 1: Mock Microservices To Speedup Development","isPartOf":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/part-1-mock-microservices-to-speedup-development\/#primaryimage"},"image":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/part-1-mock-microservices-to-speedup-development\/#primaryimage"},"thumbnailUrl":"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2016\/12\/Mock-Microservices-To-Speedup-Development-1.png","datePublished":"2016-12-16T05:07:09+00:00","dateModified":"2023-02-16T10:34:12+00:00","author":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/#\/schema\/person\/86645099906a429b0c5ca4de2bf92c46"},"description":"The microservices based architecture is an obvious choice for large applications in modern times. Such microservices are integrated in some fashion to achieve bigger business goal of the software.","breadcrumb":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/part-1-mock-microservices-to-speedup-development\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.botreetechnologies.com\/blog\/part-1-mock-microservices-to-speedup-development\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.botreetechnologies.com\/blog\/part-1-mock-microservices-to-speedup-development\/#primaryimage","url":"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2016\/12\/Mock-Microservices-To-Speedup-Development-1.png","contentUrl":"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2016\/12\/Mock-Microservices-To-Speedup-Development-1.png","width":1197,"height":653,"caption":"Mock Microservices To Speedup Development"},{"@type":"BreadcrumbList","@id":"https:\/\/www.botreetechnologies.com\/blog\/part-1-mock-microservices-to-speedup-development\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.botreetechnologies.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Part 1: Mock Microservices To Speedup Development"}]},{"@type":"WebSite","@id":"https:\/\/www.botreetechnologies.com\/blog\/#website","url":"https:\/\/www.botreetechnologies.com\/blog\/","name":"BoTree Technologies","description":"Committed to inspire generation.","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.botreetechnologies.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.botreetechnologies.com\/blog\/#\/schema\/person\/86645099906a429b0c5ca4de2bf92c46","name":"Amit Patel","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/10\/amit-patel-1-150x150.png","url":"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/10\/amit-patel-1-150x150.png","contentUrl":"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/10\/amit-patel-1-150x150.png","caption":"Amit Patel"},"description":"Amit is the COO and Co-founder of BoTree Technologies. He is a developer advocate and solution architect at the company. He has helped many SME and Large corporations digitize their business operations. He loves hanging out with friends and meditate."}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/3903","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/comments?post=3903"}],"version-history":[{"count":4,"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/3903\/revisions"}],"predecessor-version":[{"id":18622,"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/3903\/revisions\/18622"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/media\/13760"}],"wp:attachment":[{"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/media?parent=3903"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/categories?post=3903"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/tags?post=3903"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}