{"id":719,"date":"2019-07-16T14:49:00","date_gmt":"2019-07-16T14:49:00","guid":{"rendered":"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/?p=719"},"modified":"2020-12-08T16:57:07","modified_gmt":"2020-12-08T16:57:07","slug":"mocks-in-the-test-environment-part-3","status":"publish","type":"post","link":"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/mocks-in-the-test-environment-part-3\/","title":{"rendered":"Mocks in the test environment (Part 3)"},"content":{"rendered":"\n<p>In the <a href=\"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/mocks-in-the-test-environment-part-2\/\">second part<\/a>, we saw how a mock framework (in this case Moq) can be used to modify an application in such a way that certain interfaces are mocked for testing and thus cannot deliver errors.<\/p>\n\n\n\n<p>In this part we will create a self-programmed mock application and will access it with our hero database. For this we use &#8220;Docker for Windows&#8221;, which can be used since Windows 10. Before Windows 10 you had to use Hyper-V, for example to simulate a Linux machine on which you could run containers via docker. With the latest operating system from Microsoft, this procedure is also possible on Windows. You can download and install the latest version at <a href=\"https:\/\/docs.docker.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">Docs.docker.com<\/a>. The downloaded installer prepares the system for Docker.<\/p>\n\n\n\n<p>With Docker we start our hero database &#8211; as well as the APImock application that we will be building shortly. With the Postman we will then make a POST request that runs in the APImock via the hero database.<\/p>\n\n\n\n<figure class=\"wp-block-image size-medium\"><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"540\" src=\"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/wp-content\/uploads\/sites\/3\/2020\/06\/201806_mocks_-in_the_test_environment_3_1-600x540.jpg\" alt=\"Representation of the application\" class=\"wp-image-730\" srcset=\"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/wp-content\/uploads\/sites\/3\/2020\/06\/201806_mocks_-in_the_test_environment_3_1-600x540.jpg 600w, https:\/\/blogs.zeiss.com\/digital-innovation\/en\/wp-content\/uploads\/sites\/3\/2020\/06\/201806_mocks_-in_the_test_environment_3_1-1024x921.jpg 1024w, https:\/\/blogs.zeiss.com\/digital-innovation\/en\/wp-content\/uploads\/sites\/3\/2020\/06\/201806_mocks_-in_the_test_environment_3_1-768x691.jpg 768w, https:\/\/blogs.zeiss.com\/digital-innovation\/en\/wp-content\/uploads\/sites\/3\/2020\/06\/201806_mocks_-in_the_test_environment_3_1-640x576.jpg 640w, https:\/\/blogs.zeiss.com\/digital-innovation\/en\/wp-content\/uploads\/sites\/3\/2020\/06\/201806_mocks_-in_the_test_environment_3_1-1200x1080.jpg 1200w, https:\/\/blogs.zeiss.com\/digital-innovation\/en\/wp-content\/uploads\/sites\/3\/2020\/06\/201806_mocks_-in_the_test_environment_3_1.jpg 1208w\" sizes=\"auto, (max-width: 639px) 98vw, (max-width: 1199px) 64vw, 600px\" \/><figcaption><em>Figure 1: Representation of the application<\/em><\/figcaption><\/figure>\n\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Visual Studio has an extension that enables support of Docker. When creating a new project we can check the box in the template window to combine the project with Docker for Windows. We also use the Web API template to avoid having to create a completely new project.<\/p>\n\n\n\n<figure class=\"wp-block-image size-medium\"><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"408\" src=\"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/wp-content\/uploads\/sites\/3\/2020\/06\/201806_mocks_-in_the_test_environment_3_2-600x408.png\" alt=\"Visual Studio - creating API with docker\" class=\"wp-image-731\" srcset=\"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/wp-content\/uploads\/sites\/3\/2020\/06\/201806_mocks_-in_the_test_environment_3_2-600x408.png 600w, https:\/\/blogs.zeiss.com\/digital-innovation\/en\/wp-content\/uploads\/sites\/3\/2020\/06\/201806_mocks_-in_the_test_environment_3_2-768x522.png 768w, https:\/\/blogs.zeiss.com\/digital-innovation\/en\/wp-content\/uploads\/sites\/3\/2020\/06\/201806_mocks_-in_the_test_environment_3_2-640x435.png 640w, https:\/\/blogs.zeiss.com\/digital-innovation\/en\/wp-content\/uploads\/sites\/3\/2020\/06\/201806_mocks_-in_the_test_environment_3_2.png 982w\" sizes=\"auto, (max-width: 639px) 98vw, (max-width: 1199px) 64vw, 600px\" \/><figcaption><em>Figure 2: Creating a web API in Visual Studio<\/em><\/figcaption><\/figure>\n\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>When the project is loaded, an image is directly created in Docker. Each time the project is built, the image is updated in Docker.<\/p>\n\n\n\n<p>We can now run the Docker commands at the same time in Windows PowerShell to get our current images.<\/p>\n\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<pre class=\"wp-block-code\"><code>PS C:\\Users\\neco.giedrojc> docker images\nREPOSITORY                    TAG            IMAGE ID            CREATED             SIZE\napimock                    \tdev             c64f4ccd31cd        2 days ago          1.13GB\nherodatabase                   dev             5feaebecd325        2 days ago          13.3GB<\/code><\/pre>\n\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>The images can be uploaded to a repository similar to GitHub for version control and access from multiple workstations. To do this, modify the image tag to match the repository name and upload it using the push command.<\/p>\n\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<pre class=\"wp-block-code\"><code>PS C:\\Users\\neco.giedrojc> docker  tag   5feaebecd325  tester_user\/herodatabase\nPS C:\\Users\\neco.giedrojc> docker  push  tester_user\/herodatabase\nThe push refers to repository &#91;docker.io\/tester_user\/herodatabase]\n6d8d18d60d45: Pushed\n89d570a16fde: Pushed\nc18c4a07904a: Pushed\nlatest: digest: sha256:d37cf6481f52a72e1b760f98824ceefc758a7ab2924759d6881db9ef444f9db2 size: 1565\nPS C:\\Users\\neco.giedrojc><\/code><\/pre>\n\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Since the Web API template was used, the four standard REST commands (GET, POST, DELETE, PUT) are already pre-generated in the controller class. We delete all functions except POST, because this is supposed to be a &#8220;trivial function&#8221; for the mock.<\/p>\n\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;Route(\"api\/items\")]\n&#91;HttpPost]\npublic String PostMock(&#91;FromBody]String itemHero)\n{\n    String algo = \"sword\";\n    \/**\n    * here should be a function which calls an algorithm.\n    * but this is just a mock so one hardcoded line is enough\n    *\/\n\n    return algo;\n}<\/code><\/pre>\n\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>So now we have an application that has only one function and does not do anything else. The basic idea for this interface is that the database API sends the hero name to this application to get the item configuration for that hero. This means that the PostMock() function is executed on a POST request and the supplied hero name would use the algorithm for the request. However, here instead of an algorithm a fixed string is used, which always returns the same answer to each request. This ensures that no errors will come from the new application. This also ensures that this interface works as desired.<\/p>\n\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<pre class=\"wp-block-code\"><code>\n&#91;Route(\"api\/hero\/Mockitems\")]\n&#91;HttpPost]\npublic async System.Threading.Tasks.Task&lt;String> MockCallAsync(&#91;FromBody]String heroname)\n{\n    using (var client = new Webclient())\n    {\n        var values = new NameValueCollection();\n        values&#91;\"name\"]= heroname;\n\n        var response = client.UploadeValues(\"http:\/\/localhost:7266\/api\/items\", values)\n\n        var responseString = Encoding.Default.GetString(response);\n\n        return reponseString;\n    }\n}<\/code><\/pre>\n\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>In the hero database API a POST function has been implemented which forwards the request for the hero name to the APImock. For this purpose the WebClient class is used, which is filled with a string (hero name). This is then forwarded via the function of the class UploadValues().<\/p>\n\n\n\n<p>Both applications are now ready and can be started in Visual Studio via the docker button. As soon as both applications are started, you can view the currently running containers via the PowerShell. With the docker command &#8220;docker ps&#8221; we also get to know the port the containers are running on.<\/p>\n\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<pre class=\"wp-block-code\"><code>\nPS C:\\WINDOWS\\system32> docker ps\nCONTAINER ID        IMAGE                                 CREATED                STATUS                     PORT\n2aa75e039429        herodatabase:dev        7 minutes ago       Up 6 minutes        0.0.0.0:23337\nf3ae2ca8c6d0         apimock:dev                         10 minutes ago      Up 10 minutes      0.0.0.0:7266 \n<\/code><\/pre>\n\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>If we now make a request with the postman to the route &#8220;api\/Heroes\/MockItems&#8221; of the Heroes Database API, it is forwarded to the APImock and we see the answer for the hero &#8220;Maria&#8221;.<\/p>\n\n\n\n<figure class=\"wp-block-image size-medium\"><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"365\" src=\"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/wp-content\/uploads\/sites\/3\/2020\/06\/201907_mocks_-in_the_test_environment_3_3-600x365.png\" alt=\"Screenshot Interface test with Postman\" class=\"wp-image-735\" srcset=\"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/wp-content\/uploads\/sites\/3\/2020\/06\/201907_mocks_-in_the_test_environment_3_3-600x365.png 600w, https:\/\/blogs.zeiss.com\/digital-innovation\/en\/wp-content\/uploads\/sites\/3\/2020\/06\/201907_mocks_-in_the_test_environment_3_3-768x468.png 768w, https:\/\/blogs.zeiss.com\/digital-innovation\/en\/wp-content\/uploads\/sites\/3\/2020\/06\/201907_mocks_-in_the_test_environment_3_3-640x390.png 640w, https:\/\/blogs.zeiss.com\/digital-innovation\/en\/wp-content\/uploads\/sites\/3\/2020\/06\/201907_mocks_-in_the_test_environment_3_3.png 905w\" sizes=\"auto, (max-width: 639px) 98vw, (max-width: 1199px) 64vw, 600px\" \/><figcaption><em>Figure 8: Interface test with Postman<\/em><\/figcaption><\/figure>\n\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>The unmocked application would in this case list the appropriate equipment for the hero &#8220;Maria&#8221;. However, since this is a mock, the return string &#8220;sword&#8221; matches the fixed variable we set.<\/p>\n\n\n\n<p>So now you can test all functions that use the interface to the APImock without expecting errors from the APImock.<\/p>\n\n\n\n<p>Now we have seen three different ways of using mocks:<\/p>\n\n\n\n<ol class=\"wp-block-list\" type=\"1\"><li>The framework Moq, which is used to create Mock objects within the application<\/li><li>API tools (Postman), which are a kind of mock for the frontend<\/li><li>A self-written application that serves as a mock<\/li><\/ol>\n\n\n\n<p>I hope I could give you a little insight into the world of mocks.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this part we will create a self-programmed mock application and will access it with our hero database. For this we use &#8220;Docker for Windows&#8221;. <\/p>\n","protected":false},"author":76,"featured_media":732,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"advgb_blocks_editor_width":"","advgb_blocks_columns_visual_guide":"","footnotes":""},"categories":[7],"tags":[346,347,352,353,354,356,357,359,360],"topics":[83],"class_list":["post-719","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-quality-assurance","tag-mocks","tag-moq","tag-api","tag-framework-moq","tag-api-tools","tag-mock-framework","tag-docker-for-windows","tag-visual-studio","tag-web-api","topics-mocks-in-the-test-environment"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Mocks in the test environment (Part 3) - ZEISS Digital Innovation Blog<\/title>\n<meta name=\"description\" content=\"In this part we will create a self-programmed mock application and will access it with our hero database. For this we use &quot;Docker for Windows&quot;.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/mocks-in-the-test-environment-part-3\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Mocks in the test environment (Part 3) - ZEISS Digital Innovation Blog\" \/>\n<meta property=\"og:description\" content=\"In this part we will create a self-programmed mock application and will access it with our hero database. For this we use &quot;Docker for Windows&quot;.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/mocks-in-the-test-environment-part-3\/\" \/>\n<meta property=\"og:site_name\" content=\"Digital Innovation Blog\" \/>\n<meta property=\"article:published_time\" content=\"2019-07-16T14:49:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-12-08T16:57:07+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/wp-content\/uploads\/sites\/3\/2020\/06\/201907_mocks_-in_the_test_environment_3_1_fi.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1184\" \/>\n\t<meta property=\"og:image:height\" content=\"665\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Neco Giedrojc\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Neco Giedrojc\" \/>\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\":\"WebPage\",\"@id\":\"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/mocks-in-the-test-environment-part-3\/\",\"url\":\"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/mocks-in-the-test-environment-part-3\/\",\"name\":\"Mocks in the test environment (Part 3) - ZEISS Digital Innovation Blog\",\"isPartOf\":{\"@id\":\"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/mocks-in-the-test-environment-part-3\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/mocks-in-the-test-environment-part-3\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/wp-content\/uploads\/sites\/3\/2020\/06\/201907_mocks_-in_the_test_environment_3_1_fi.png\",\"datePublished\":\"2019-07-16T14:49:00+00:00\",\"dateModified\":\"2020-12-08T16:57:07+00:00\",\"author\":{\"@id\":\"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/#\/schema\/person\/52922d077aabdd8130bc2df264e0cf5b\"},\"description\":\"In this part we will create a self-programmed mock application and will access it with our hero database. For this we use \\\"Docker for Windows\\\".\",\"breadcrumb\":{\"@id\":\"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/mocks-in-the-test-environment-part-3\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/mocks-in-the-test-environment-part-3\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/mocks-in-the-test-environment-part-3\/#primaryimage\",\"url\":\"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/wp-content\/uploads\/sites\/3\/2020\/06\/201907_mocks_-in_the_test_environment_3_1_fi.png\",\"contentUrl\":\"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/wp-content\/uploads\/sites\/3\/2020\/06\/201907_mocks_-in_the_test_environment_3_1_fi.png\",\"width\":1184,\"height\":665},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/mocks-in-the-test-environment-part-3\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Mocks in the test environment (Part 3)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/#website\",\"url\":\"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/\",\"name\":\"Digital Innovation Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/#\/schema\/person\/52922d077aabdd8130bc2df264e0cf5b\",\"name\":\"Neco Giedrojc\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/wp-content\/uploads\/sites\/3\/2020\/05\/giedrojc_neco-150x150.jpg\",\"contentUrl\":\"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/wp-content\/uploads\/sites\/3\/2020\/05\/giedrojc_neco-150x150.jpg\",\"caption\":\"Neco Giedrojc\"},\"description\":\"Shortly after completing his degree in \\\"Computer Engineering\\\", Neco Giedrojc joined the test area of ZEISS Digital Innovation and works there as a tester. In his main project, he is currently dealing with the integration test of complex systems.\",\"url\":\"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/author\/ennecogiedrojc\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Mocks in the test environment (Part 3) - ZEISS Digital Innovation Blog","description":"In this part we will create a self-programmed mock application and will access it with our hero database. For this we use \"Docker for Windows\".","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:\/\/blogs.zeiss.com\/digital-innovation\/en\/mocks-in-the-test-environment-part-3\/","og_locale":"en_US","og_type":"article","og_title":"Mocks in the test environment (Part 3) - ZEISS Digital Innovation Blog","og_description":"In this part we will create a self-programmed mock application and will access it with our hero database. For this we use \"Docker for Windows\".","og_url":"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/mocks-in-the-test-environment-part-3\/","og_site_name":"Digital Innovation Blog","article_published_time":"2019-07-16T14:49:00+00:00","article_modified_time":"2020-12-08T16:57:07+00:00","og_image":[{"width":1184,"height":665,"url":"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/wp-content\/uploads\/sites\/3\/2020\/06\/201907_mocks_-in_the_test_environment_3_1_fi.png","type":"image\/png"}],"author":"Neco Giedrojc","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Neco Giedrojc","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/mocks-in-the-test-environment-part-3\/","url":"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/mocks-in-the-test-environment-part-3\/","name":"Mocks in the test environment (Part 3) - ZEISS Digital Innovation Blog","isPartOf":{"@id":"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/mocks-in-the-test-environment-part-3\/#primaryimage"},"image":{"@id":"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/mocks-in-the-test-environment-part-3\/#primaryimage"},"thumbnailUrl":"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/wp-content\/uploads\/sites\/3\/2020\/06\/201907_mocks_-in_the_test_environment_3_1_fi.png","datePublished":"2019-07-16T14:49:00+00:00","dateModified":"2020-12-08T16:57:07+00:00","author":{"@id":"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/#\/schema\/person\/52922d077aabdd8130bc2df264e0cf5b"},"description":"In this part we will create a self-programmed mock application and will access it with our hero database. For this we use \"Docker for Windows\".","breadcrumb":{"@id":"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/mocks-in-the-test-environment-part-3\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blogs.zeiss.com\/digital-innovation\/en\/mocks-in-the-test-environment-part-3\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/mocks-in-the-test-environment-part-3\/#primaryimage","url":"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/wp-content\/uploads\/sites\/3\/2020\/06\/201907_mocks_-in_the_test_environment_3_1_fi.png","contentUrl":"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/wp-content\/uploads\/sites\/3\/2020\/06\/201907_mocks_-in_the_test_environment_3_1_fi.png","width":1184,"height":665},{"@type":"BreadcrumbList","@id":"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/mocks-in-the-test-environment-part-3\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/"},{"@type":"ListItem","position":2,"name":"Mocks in the test environment (Part 3)"}]},{"@type":"WebSite","@id":"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/#website","url":"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/","name":"Digital Innovation Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/#\/schema\/person\/52922d077aabdd8130bc2df264e0cf5b","name":"Neco Giedrojc","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/#\/schema\/person\/image\/","url":"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/wp-content\/uploads\/sites\/3\/2020\/05\/giedrojc_neco-150x150.jpg","contentUrl":"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/wp-content\/uploads\/sites\/3\/2020\/05\/giedrojc_neco-150x150.jpg","caption":"Neco Giedrojc"},"description":"Shortly after completing his degree in \"Computer Engineering\", Neco Giedrojc joined the test area of ZEISS Digital Innovation and works there as a tester. In his main project, he is currently dealing with the integration test of complex systems.","url":"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/author\/ennecogiedrojc\/"}]}},"author_meta":{"display_name":"Neco Giedrojc","author_link":"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/author\/ennecogiedrojc\/"},"featured_img":"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/wp-content\/uploads\/sites\/3\/2020\/06\/201907_mocks_-in_the_test_environment_3_1_fi-600x337.png","coauthors":[],"tax_additional":{"categories":{"linked":["<a href=\"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/category\/quality-assurance\/\" class=\"advgb-post-tax-term\">Quality Assurance<\/a>"],"unlinked":["<span class=\"advgb-post-tax-term\">Quality Assurance<\/span>"]},"tags":{"linked":["<a href=\"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/category\/quality-assurance\/\" class=\"advgb-post-tax-term\">Mocks<\/a>","<a href=\"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/category\/quality-assurance\/\" class=\"advgb-post-tax-term\">Moq<\/a>","<a href=\"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/category\/quality-assurance\/\" class=\"advgb-post-tax-term\">API<\/a>","<a href=\"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/category\/quality-assurance\/\" class=\"advgb-post-tax-term\">Framework-Moq<\/a>","<a href=\"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/category\/quality-assurance\/\" class=\"advgb-post-tax-term\">API-Tools<\/a>","<a href=\"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/category\/quality-assurance\/\" class=\"advgb-post-tax-term\">Mock-Framework<\/a>","<a href=\"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/category\/quality-assurance\/\" class=\"advgb-post-tax-term\">Docker for Windows<\/a>","<a href=\"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/category\/quality-assurance\/\" class=\"advgb-post-tax-term\">Visual Studio<\/a>","<a href=\"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/category\/quality-assurance\/\" class=\"advgb-post-tax-term\">Web API<\/a>"],"unlinked":["<span class=\"advgb-post-tax-term\">Mocks<\/span>","<span class=\"advgb-post-tax-term\">Moq<\/span>","<span class=\"advgb-post-tax-term\">API<\/span>","<span class=\"advgb-post-tax-term\">Framework-Moq<\/span>","<span class=\"advgb-post-tax-term\">API-Tools<\/span>","<span class=\"advgb-post-tax-term\">Mock-Framework<\/span>","<span class=\"advgb-post-tax-term\">Docker for Windows<\/span>","<span class=\"advgb-post-tax-term\">Visual Studio<\/span>","<span class=\"advgb-post-tax-term\">Web API<\/span>"]}},"comment_count":"0","relative_dates":{"created":"Posted 7 years ago","modified":"Updated 5 years ago"},"absolute_dates":{"created":"Posted on July 16, 2019","modified":"Updated on December 8, 2020"},"absolute_dates_time":{"created":"Posted on July 16, 2019 2:49 pm","modified":"Updated on December 8, 2020 4:57 pm"},"featured_img_caption":"","series_order":"","_links":{"self":[{"href":"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/wp-json\/wp\/v2\/posts\/719","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/wp-json\/wp\/v2\/users\/76"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/wp-json\/wp\/v2\/comments?post=719"}],"version-history":[{"count":8,"href":"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/wp-json\/wp\/v2\/posts\/719\/revisions"}],"predecessor-version":[{"id":1199,"href":"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/wp-json\/wp\/v2\/posts\/719\/revisions\/1199"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/wp-json\/wp\/v2\/media\/732"}],"wp:attachment":[{"href":"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/wp-json\/wp\/v2\/media?parent=719"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/wp-json\/wp\/v2\/categories?post=719"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/wp-json\/wp\/v2\/tags?post=719"},{"taxonomy":"topics","embeddable":true,"href":"https:\/\/blogs.zeiss.com\/digital-innovation\/en\/wp-json\/wp\/v2\/topics?post=719"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}