{"id":33776,"date":"2014-12-01T16:00:39","date_gmt":"2014-12-01T14:00:39","guid":{"rendered":"http:\/\/www.javacodegeeks.com\/?p=33776"},"modified":"2014-12-01T06:28:58","modified_gmt":"2014-12-01T04:28:58","slug":"black-box-testing-of-spring-boot-microservice-is-so-easy","status":"publish","type":"post","link":"https:\/\/www.javacodegeeks.com\/2014\/12\/black-box-testing-of-spring-boot-microservice-is-so-easy.html","title":{"rendered":"Black Box Testing of Spring Boot Microservice is so easy"},"content":{"rendered":"<p>When I needed to do prototyping, proof of concept or play with some new technology in free time, starting new project was always a little annoying barrier with Maven. Have to say that setting up Maven project is not hard and you can use Maven Archetypes. But Archetypes are often out of date. Who wants to play with old technologies? So I always end up wiring in dependencies I wanted to play with. Not very productive spent time.<\/p>\n<p>But than Spring Boot came to my way. I fell in love. In last few months I created at least 50 small playground projects, prototypes with Spring Boot. Also incorporated it at work. It\u2019s just perfect for prototyping, learning, microservices, web, batch, enterprise, message flow or command line applications. You have to be dinosaur or be blind not to evaluate Spring Boot for your next Spring project. And when you finish evaluate it, you will go for it. I promise.<\/p>\n<p>I feel a need to highlight how easy is Black Box Testing of Spring Boot microservice. <a href=\"https:\/\/en.wikipedia.org\/wiki\/Black-box_testing\">Black Box Testing<\/a> refers to testing without any poking with application artifact. Such testing can be called also integration testing. You can also perform performance or stress testing way I am going to demonstrate.<\/p>\n<p>Spring Boot Microservice is usually web application with embedded Tomcat. So it is executed as JAR from command line. <a href=\"http:\/\/spring.io\/guides\/gs\/convert-jar-to-war\/\">There is possibility to convert Spring Boot project into WAR artifact, that can be hosted on shared Servlet container<\/a>. But we don\u2019t want that now. It\u2019s better when microservice has its own little embedded container.<\/p>\n<p>I used existing <a href=\"http:\/\/spring.io\/guides\/gs\/rest-service\/\">Spring\u2019s REST service guide <\/a>as testing target. Focus is mostly on testing project, so it is handy to use this \u201cHello World\u201d REST application as example. I expect these two common tools are set up and installed on your machine:<\/p>\n<ul>\n<li><a href=\"https:\/\/maven.apache.org\/\">Maven 3<\/a><\/li>\n<li><a href=\"http:\/\/www.git-scm.com\/\">Git<\/a><\/li>\n<\/ul>\n<p>So we\u2019ll need to download source code and install JAR artifact into our local repository. I am going to use command line to download and install the microservice. Let\u2019s go to some directory where we download source code. Use these commands:<\/p>\n<pre class=\" brush:java\">git clone git@github.com:spring-guides\/gs-rest-service.git\r\ncd gs-rest-service\/complete\r\nmvn clean install<\/pre>\n<p>If everything went OK, Spring Boot microservice JAR artifact is now installed in our local Maven repository. In serious Java development, it would be rather installed into shared repository (e.g. Artifactory, Nexus,\u2026 ). When our microservice is installed, we can focus on testing project. It is also Maven and Spring Boot based.<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<p>Black box testing will be achieved by downloading the artifact from Maven repository (doesn\u2019t matter if it is local or remote). Maven-dependency-plugin can help us this way:<\/p>\n<pre class=\" brush:xml\">&lt;plugin&gt;\r\n\u00a0\u00a0 \u00a0&lt;groupId&gt;org.apache.maven.plugins&lt;\/groupId&gt;\r\n\u00a0\u00a0 \u00a0&lt;artifactId&gt;maven-dependency-plugin&lt;\/artifactId&gt;\r\n\u00a0\u00a0 \u00a0&lt;executions&gt;\r\n\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0&lt;execution&gt;\r\n\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0&lt;id&gt;copy-dependencies&lt;\/id&gt;\r\n\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0&lt;phase&gt;compile&lt;\/phase&gt;\r\n\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0&lt;goals&gt;\r\n\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0&lt;goal&gt;copy-dependencies&lt;\/goal&gt;\r\n\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0&lt;\/goals&gt;\r\n\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0&lt;configuration&gt;\r\n\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0&lt;includeArtifactIds&gt;gs-rest-service&lt;\/includeArtifactIds&gt;\r\n\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0&lt;stripVersion&gt;true&lt;\/stripVersion&gt;\r\n\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0&lt;\/configuration&gt;\r\n\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0&lt;\/execution&gt;\r\n\u00a0\u00a0 \u00a0&lt;\/executions&gt;\r\n&lt;\/plugin&gt;<\/pre>\n<p>It downloads microservice artifact into <strong><code>target\/dependency<\/code><\/strong> directory by default. As you can see, it\u2019s hooked to <strong><code>compile<\/code><\/strong> phase of Maven lifecycle, so that downloaded artifact is available during <strong><code>test<\/code><\/strong> phase. Artifact version is stripped from version information. We use latest version. It makes usage of JAR artifact easier during testing.<\/p>\n<p>Readers skilled with Maven may notice missing plugin version. Spring Boot driven project is inherited from parent Maven project called <strong><code>spring-boot-starter-parent<\/code><\/strong><code><\/code>. It contains versions of main Maven plugins. This is one of the Spring Boot\u2019s opinionated aspects. I like it, because it provides stable dependencies matrix. You can change the version if you need.<\/p>\n<p>When we have artifact in our file system, we can start testing. We need to be able to execute JAR file from command line. I used standard Java <a href=\"https:\/\/docs.oracle.com\/javase\/8\/docs\/api\/java\/lang\/ProcessBuilder.html\">ProcessBuilder<\/a> this way:<\/p>\n<pre class=\" brush:java\">public class ProcessExecutor {\r\n\tpublic Process execute(String jarName) throws IOException {\r\n\t\tProcess p = null;\r\n\t\tProcessBuilder pb = new ProcessBuilder(\"java\", \"-jar\", jarName);\r\n\t\tpb.directory(new File(\"target\/dependency\"));\r\n\t\tFile log = new File(\"log\");\r\n\t\tpb.redirectErrorStream(true);\r\n\t\tpb.redirectOutput(Redirect.appendTo(log));\r\n\t\tp = pb.start();\r\n\t\treturn p;\r\n\t}\r\n}<\/pre>\n<p>This class executes given process JAR based on given file name. Location is hard-coded to\u00a0 <strong><code>target\/dependency<\/code><\/strong> directory, where <strong><code>maven-dependency-plugin<\/code><\/strong> located our artifact. Standard and error outputs are redirected to file. Next class needed for testing is DTO (Data\u00a0 transfer object). It is simple POJO that will be used for deserialization from JSON. I use <a href=\"http:\/\/projectlombok.org\/features\/index.html\">Lombok<\/a> project to reduce boilerplate code needed for getters, setters, hashCode and equals.<\/p>\n<pre class=\" brush:java\">@Data\r\n@AllArgsConstructor\r\n@NoArgsConstructor\r\npublic class Greeting {\r\n    private long id;\r\n    private String content;\r\n}<\/pre>\n<p>Test itself looks like this:<\/p>\n<pre class=\" brush:java\">public class BlackBoxTest {\r\n\tprivate static final String RESOURCE_URL = \"http:\/\/localhost:8080\/greeting\";\r\n\r\n\t@Test\r\n\tpublic void contextLoads() throws InterruptedException, IOException {\r\n\t\tProcess process = null;\r\n\t\tGreeting actualGreeting = null;\r\n\t\ttry {\r\n\t\t\tprocess = new ProcessExecutor().execute(\"gs-rest-service.jar\");\r\n\r\n\t\t\tRestTemplate restTemplate = new RestTemplate();\r\n\t\t\twaitForStart(restTemplate);\r\n\r\n\t\t\tactualGreeting = restTemplate.getForObject(RESOURCE_URL, Greeting.class);\r\n\t\t} finally {\r\n\t\t\tprocess.destroyForcibly();\r\n\t\t}\r\n\t\tAssert.assertEquals(new Greeting(2L, \"Hello, World!\"), actualGreeting);\r\n\t}\r\n\r\n\tprivate void waitForStart(RestTemplate restTemplate) {\r\n\t\twhile (true) {\r\n\t\t\ttry {\r\n\t\t\t\tThread.sleep(500);\r\n\t\t\t\trestTemplate.getForObject(RESOURCE_URL, String.class);\r\n\t\t\t\treturn;\r\n\t\t\t} catch (Throwable throwable) {\r\n\t\t\t\t\/\/ ignoring errors\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}<\/pre>\n<p>It executes Spring Boot microservice process first and wait unit it starts. To verify if microservice is started, it sends HTTP request to URL where it\u2019s expected. The service is ready for testing after first successful response. Microservice should send simple greeting JSON response for HTTP GET request. Deserialization from JSON into our <strong><code>Greeting<\/code><\/strong> DTO is verified at the end of the test.<\/p>\n<ul>\n<li><a href=\"https:\/\/github.com\/lkrnac\/blog-2014-11-06-testing-spring-boot-miscroservice\">Source code is shared on Github<\/a>.<\/li>\n<\/ul>\n<div class=\"attribution\">\n<table>\n<tbody>\n<tr>\n<td><span class=\"reference\">Reference: <\/span><\/td>\n<td><a href=\"http:\/\/lkrnac.net\/blog\/2014\/11\/testing-spring-boot-microservice\/\">Black Box Testing of Spring Boot Microservice is so easy<\/a> from our <a href=\"http:\/\/www.javacodegeeks.com\/jcg\/\">JCG partner<\/a> Lubos Krnac at the <a href=\"http:\/\/lkrnac.net\/blog\/\">Lubos Krnac Java blog<\/a> blog.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>When I needed to do prototyping, proof of concept or play with some new technology in free time, starting new project was always a little annoying barrier with Maven. Have to say that setting up Maven project is not hard and you can use Maven Archetypes. But Archetypes are often out of date. Who wants &hellip;<\/p>\n","protected":false},"author":534,"featured_media":240,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[30,854],"class_list":["post-33776","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-enterprise-java","tag-spring","tag-spring-boot"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Black Box Testing of Spring Boot Microservice is so easy<\/title>\n<meta name=\"description\" content=\"When I needed to do prototyping, proof of concept or play with some new technology in free time, starting new project was always a little annoying barrier\" \/>\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.javacodegeeks.com\/2014\/12\/black-box-testing-of-spring-boot-microservice-is-so-easy.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Black Box Testing of Spring Boot Microservice is so easy\" \/>\n<meta property=\"og:description\" content=\"When I needed to do prototyping, proof of concept or play with some new technology in free time, starting new project was always a little annoying barrier\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.javacodegeeks.com\/2014\/12\/black-box-testing-of-spring-boot-microservice-is-so-easy.html\" \/>\n<meta property=\"og:site_name\" content=\"Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2014-12-01T14:00:39+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/spring-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Lubos Krnac\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/luboskrnac\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Lubos Krnac\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/12\\\/black-box-testing-of-spring-boot-microservice-is-so-easy.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/12\\\/black-box-testing-of-spring-boot-microservice-is-so-easy.html\"},\"author\":{\"name\":\"Lubos Krnac\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/c37fdcf9c17dcd577b0b278db3fa1fb7\"},\"headline\":\"Black Box Testing of Spring Boot Microservice is so easy\",\"datePublished\":\"2014-12-01T14:00:39+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/12\\\/black-box-testing-of-spring-boot-microservice-is-so-easy.html\"},\"wordCount\":739,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/12\\\/black-box-testing-of-spring-boot-microservice-is-so-easy.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/spring-logo.jpg\",\"keywords\":[\"Spring\",\"Spring Boot\"],\"articleSection\":[\"Enterprise Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/12\\\/black-box-testing-of-spring-boot-microservice-is-so-easy.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/12\\\/black-box-testing-of-spring-boot-microservice-is-so-easy.html\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/12\\\/black-box-testing-of-spring-boot-microservice-is-so-easy.html\",\"name\":\"Black Box Testing of Spring Boot Microservice is so easy\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/12\\\/black-box-testing-of-spring-boot-microservice-is-so-easy.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/12\\\/black-box-testing-of-spring-boot-microservice-is-so-easy.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/spring-logo.jpg\",\"datePublished\":\"2014-12-01T14:00:39+00:00\",\"description\":\"When I needed to do prototyping, proof of concept or play with some new technology in free time, starting new project was always a little annoying barrier\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/12\\\/black-box-testing-of-spring-boot-microservice-is-so-easy.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/12\\\/black-box-testing-of-spring-boot-microservice-is-so-easy.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/12\\\/black-box-testing-of-spring-boot-microservice-is-so-easy.html#primaryimage\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/spring-logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/spring-logo.jpg\",\"width\":150,\"height\":150,\"caption\":\"spring-interview-questions-answers\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/12\\\/black-box-testing-of-spring-boot-microservice-is-so-easy.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Enterprise Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\\\/enterprise-java\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Black Box Testing of Spring Boot Microservice is so easy\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Developers Resource Center\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.javacodegeeks.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/javacodegeeks\",\"https:\\\/\\\/x.com\\\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/c37fdcf9c17dcd577b0b278db3fa1fb7\",\"name\":\"Lubos Krnac\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/de54fe70007a5ff7a805ec6c874812ec129162cb080f66e7a14a05df13da44d1?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/de54fe70007a5ff7a805ec6c874812ec129162cb080f66e7a14a05df13da44d1?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/de54fe70007a5ff7a805ec6c874812ec129162cb080f66e7a14a05df13da44d1?s=96&d=mm&r=g\",\"caption\":\"Lubos Krnac\"},\"description\":\"Lubos is a Java\\\/JavaScript developer\\\/Tech Lead and Automation enthusiast. His religion is to constantly improve his developments skills and learn new approaches. He believes TDD drives better design and nicely decoupled code. Past experience includes C++, Assembler and C#.\",\"sameAs\":[\"http:\\\/\\\/lkrnac.net\\\/\",\"http:\\\/\\\/www.linkedin.com\\\/pub\\\/lubos-krnac\\\/27\\\/21a\\\/b2\",\"https:\\\/\\\/x.com\\\/https:\\\/\\\/twitter.com\\\/luboskrnac\"],\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/author\\\/lubos-krnac\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Black Box Testing of Spring Boot Microservice is so easy","description":"When I needed to do prototyping, proof of concept or play with some new technology in free time, starting new project was always a little annoying barrier","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.javacodegeeks.com\/2014\/12\/black-box-testing-of-spring-boot-microservice-is-so-easy.html","og_locale":"en_US","og_type":"article","og_title":"Black Box Testing of Spring Boot Microservice is so easy","og_description":"When I needed to do prototyping, proof of concept or play with some new technology in free time, starting new project was always a little annoying barrier","og_url":"https:\/\/www.javacodegeeks.com\/2014\/12\/black-box-testing-of-spring-boot-microservice-is-so-easy.html","og_site_name":"Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2014-12-01T14:00:39+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/spring-logo.jpg","type":"image\/jpeg"}],"author":"Lubos Krnac","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/luboskrnac","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Lubos Krnac","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.javacodegeeks.com\/2014\/12\/black-box-testing-of-spring-boot-microservice-is-so-easy.html#article","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/2014\/12\/black-box-testing-of-spring-boot-microservice-is-so-easy.html"},"author":{"name":"Lubos Krnac","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/c37fdcf9c17dcd577b0b278db3fa1fb7"},"headline":"Black Box Testing of Spring Boot Microservice is so easy","datePublished":"2014-12-01T14:00:39+00:00","mainEntityOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2014\/12\/black-box-testing-of-spring-boot-microservice-is-so-easy.html"},"wordCount":739,"commentCount":0,"publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2014\/12\/black-box-testing-of-spring-boot-microservice-is-so-easy.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/spring-logo.jpg","keywords":["Spring","Spring Boot"],"articleSection":["Enterprise Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.javacodegeeks.com\/2014\/12\/black-box-testing-of-spring-boot-microservice-is-so-easy.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/2014\/12\/black-box-testing-of-spring-boot-microservice-is-so-easy.html","url":"https:\/\/www.javacodegeeks.com\/2014\/12\/black-box-testing-of-spring-boot-microservice-is-so-easy.html","name":"Black Box Testing of Spring Boot Microservice is so easy","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2014\/12\/black-box-testing-of-spring-boot-microservice-is-so-easy.html#primaryimage"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2014\/12\/black-box-testing-of-spring-boot-microservice-is-so-easy.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/spring-logo.jpg","datePublished":"2014-12-01T14:00:39+00:00","description":"When I needed to do prototyping, proof of concept or play with some new technology in free time, starting new project was always a little annoying barrier","breadcrumb":{"@id":"https:\/\/www.javacodegeeks.com\/2014\/12\/black-box-testing-of-spring-boot-microservice-is-so-easy.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.javacodegeeks.com\/2014\/12\/black-box-testing-of-spring-boot-microservice-is-so-easy.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/2014\/12\/black-box-testing-of-spring-boot-microservice-is-so-easy.html#primaryimage","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/spring-logo.jpg","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/spring-logo.jpg","width":150,"height":150,"caption":"spring-interview-questions-answers"},{"@type":"BreadcrumbList","@id":"https:\/\/www.javacodegeeks.com\/2014\/12\/black-box-testing-of-spring-boot-microservice-is-so-easy.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Java","item":"https:\/\/www.javacodegeeks.com\/category\/java"},{"@type":"ListItem","position":3,"name":"Enterprise Java","item":"https:\/\/www.javacodegeeks.com\/category\/java\/enterprise-java"},{"@type":"ListItem","position":4,"name":"Black Box Testing of Spring Boot Microservice is so easy"}]},{"@type":"WebSite","@id":"https:\/\/www.javacodegeeks.com\/#website","url":"https:\/\/www.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Developers Resource Center","publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/c37fdcf9c17dcd577b0b278db3fa1fb7","name":"Lubos Krnac","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/de54fe70007a5ff7a805ec6c874812ec129162cb080f66e7a14a05df13da44d1?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/de54fe70007a5ff7a805ec6c874812ec129162cb080f66e7a14a05df13da44d1?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/de54fe70007a5ff7a805ec6c874812ec129162cb080f66e7a14a05df13da44d1?s=96&d=mm&r=g","caption":"Lubos Krnac"},"description":"Lubos is a Java\/JavaScript developer\/Tech Lead and Automation enthusiast. His religion is to constantly improve his developments skills and learn new approaches. He believes TDD drives better design and nicely decoupled code. Past experience includes C++, Assembler and C#.","sameAs":["http:\/\/lkrnac.net\/","http:\/\/www.linkedin.com\/pub\/lubos-krnac\/27\/21a\/b2","https:\/\/x.com\/https:\/\/twitter.com\/luboskrnac"],"url":"https:\/\/www.javacodegeeks.com\/author\/lubos-krnac"}]}},"_links":{"self":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/33776","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/users\/534"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=33776"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/33776\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media\/240"}],"wp:attachment":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=33776"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=33776"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=33776"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}