{"id":1225,"date":"2011-01-14T07:24:50","date_gmt":"2011-01-14T14:24:50","guid":{"rendered":"https:\/\/simpleprogrammer.com\/2011\/01\/14\/back-to-basics-unit-testing-automated-blackbox-testing-and-conclusions\/"},"modified":"2018-01-12T12:18:04","modified_gmt":"2018-01-12T17:18:04","slug":"back-to-basics-unit-testing-automated-blackbox-testing-and-conclusions","status":"publish","type":"post","link":"https:\/\/simpleprogrammer.com\/back-to-basics-unit-testing-automated-blackbox-testing-and-conclusions\/","title":{"rendered":"Unit Testing and Automated Blackbox Testing"},"content":{"rendered":"<p>If you\u2019ve been following me from the <a href=\"https:\/\/simpleprogrammer.com\/2010\/10\/30\/getting-back-to-basics-introduction-and-why\/\">beginning<\/a> of the <a href=\"https:\/\/simpleprogrammer.com\/back-to-basics-series\/\">Back to Basics series<\/a>, you\u2019ll know that I set out to reevaluate some of the commonly held truths of what best practices are, especially in regards to unit testing, dependency injection and inversion of control containers.\\n\\nWe\u2019ve talked about <a href=\"https:\/\/simpleprogrammer.com\/2010\/11\/02\/back-to-basics-what-is-an-interface\/\">what an interface<\/a> is, <a href=\"https:\/\/simpleprogrammer.com\/2010\/11\/04\/back-to-basics-cohesion-and-coupling-part-1\/\">cohesion and coupling<\/a>, and even went a little bit off track to talk about <a href=\"https:\/\/simpleprogrammer.com\/2010\/12\/07\/back-to-basics-sorting\/\">sorting<\/a> for a bit.\\n\\nOne of the reoccurring themes that kept showing up in most of the posts was unit testing.\u00a0 I talked about <a href=\"https:\/\/simpleprogrammer.com\/2010\/12\/12\/back-to-basics-why-unit-testing-is-hard\/\">why unit testing is hard<\/a>, and I defined three levels of unit testing.\\n\\n<\/p>\n<ul>\\n    <\/p>\n<li><strong>Level 1<\/strong> &#8211; we have a single class with no external dependencies and no state.\u00a0 We are just testing an algorithm.<\/li>\n<p>\\n    <\/p>\n<li><strong>Level 2<\/strong> &#8211; we have a single class with no external dependencies but it does have state.\u00a0 We are setting up an object and testing it as a whole.<\/li>\n<p>\\n    <\/p>\n<li><strong>Level 3<\/strong> &#8211; we have a single class with at least one external dependency, but it does not depend on its own internal state.<\/li>\n<p>\\n    <\/p>\n<li><strong>Level 4<\/strong> &#8211; we have a single class with at least one external dependency and depends on its own internal state.<\/li>\n<p>\\n<\/ul>\n<p>\\n\\nThroughout this series I ended up tearing down using interfaces with only single non-unit test implementation.\u00a0 I criticized the overuse of dependency injection for the sole purpose of unit testing.\u00a0 I attacked a large portion of best practices that I felt were only really being used in order to be able to unit test classes in isolation.\\n\\nBut, I never offered a solution.\u00a0 I told you what was bad, but I never told you what was good.\\n\\nI said don\u2019t create all these extra interfaces, use IoC containers all over your app, and mocks everywhere just for the purpose of being able to isolate a class you want to unit test, but when you asked me what to do instead, I said \u201cI don\u2019t know, I just know what we are doing is wrong and we need to stop.\u201d\\n\\nWell, that is no answer, but I intend to give one now.\u00a0 I\u2019ve been thinking about this for months, researching the topic and experimenting on my own.\\n\\n<a href=\"https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2011\/01\/cool-experiment.jpg\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; padding-left: 0; padding-right: 0; display: inline; padding-top: 0; border: 0;\" title=\"cool experiment\" src=\"https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2011\/01\/cool-experiment_thumb.jpg\" alt=\"cool experiment\" width=\"488\" height=\"390\" border=\"0\" \/><\/a>\\n\\n<\/p>\n<h2>I finally have an answer<\/h2>\n<p>\\n\\nBut, before I give you it, I want to give you a little background on my position on the subject matter.\\n\\nI come from a pretty solid background of unit testing and test driven development.\u00a0 I have been preaching both for at least the last 7 years.\\n\\nI was on board from the beginning with dependency injection and IoC containers.\u00a0 I had even rolled my own as a way to facilitate isolating dependencies for true unit tests.\\n\\nI think unit testing and TDD are very good skills to have.\u00a0 I think everyone should learn them.\u00a0 TDD truly helps you write object oriented code with small concentrated areas of responsibility.\\n\\nBut, after all this time I have finally concluded, for the most part, that unit tests and practicing TDD in general do more good for the coder than the software.\\n\\nWhat?\u00a0 How can I speak such blasphemy?\\n\\nThe truth of the matter is that I have personally grown as a developer by learning and practicing TDD, which has lead me to build better software, but not because the unit tests themselves did much.\\n\\nWhat happened is that while I was feeling all that pain of creating mocks for dependencies and trying to unit test code after I had written it, I was learning to reduce dependencies and how to create proper abstractions.\\n\\nI feel like I learned the most when the IoC frameworks were the weakest, because I was forced to minimize dependencies for the pain of trying to create so many mocks or not being able to unit test a class in isolation at all.\\n\\nI\u2019ve gotten to the point now where two things have happened:\\n\\n<\/p>\n<ol>\\n    <\/p>\n<li>I don\u2019t need the TDD training wheels anymore.\u00a0 I don\u2019t pretend to be a coding god or demi-god of some sort, but in general the code I write that is done in a TDD or BDD style is almost exactly the same as the code I write without it.<\/li>\n<p>\\n    <\/p>\n<li>The IoC containers have made it so easy to pass 50 dependencies into my constructor that I am no longer feeling the pain that caused my unit tests to cause me to write better code.<\/li>\n<p>\\n<\/ol>\n<p>\\n\\nWhat I find myself ending up with now when I write unit tests is 70% mocking code that verifies that my code calls certain methods in a certain order.\\n\\nMany times I can\u2019t even be sure if my unit test is actually testing what I think it is, because it is so complex.\\n\\n<\/p>\n<h2>Umm, did you say you had an answer, dude?<\/h2>\n<p>\\n\\nYes, I do have an answer.\u00a0 I just wanted to make sure you understand where I am coming from before I throw out all these years of practical knowledge and good practices.\\n\\n<strong>I am not the enemy.<\/strong>\\n\\nMy answer to the problem of what to do if you shouldn\u2019t be using IoC containers and interfaces all over your code base just for the purpose of unit testing, is to take a two pronged approach.\\n\\n<a href=\"https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2011\/01\/2prong.jpg\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; padding-left: 0; padding-right: 0; display: inline; padding-top: 0; border: 0;\" title=\"2prong\" src=\"https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2011\/01\/2prong_thumb.jpg\" alt=\"2prong\" width=\"480\" height=\"480\" border=\"0\" \/><\/a>\\n\\n<\/p>\n<ol>\\n    <\/p>\n<li>Mostly only write level 1 or level 2 unit tests.\u00a0 Occasionally write level 3 unit tests if you only have 1 or possibly 2 dependencies.\u00a0 (I\u2019ll talk about more how to do this in my next post)<\/li>\n<p>\\n    <\/p>\n<li>Spend a majority of your effort, all the time you would have spent writing unit tests, instead writing what I will call blackbox automated tests or BATs.\u00a0 (I used to call this automated functional tests, but I think that name is too ambiguous.)<\/li>\n<p>\\n<\/ol>\n<p>\\n\\nI intend to drill really deep into these approaches in some upcoming posts, but I want to briefly talk about why I am suggesting these two things in place of traditional BDD or TDD approaches.\\n\\n<\/p>\n<h2>What are the benefits?<\/h2>\n<p>\\n\\n<strong>The first obvious benefit is that you won\u2019t be complicating your production code with complex frameworks for injecting dependencies and other clever things that really amount to making unit testing easier.<\/strong>\\n\\nAgain, I am not saying you shouldn\u2019t ever use dependency injection, interfaces or IoC containers.\u00a0 I am just saying you should use them when they provide a real tangible value (which most of the time is going to require alternate non-unit test implementations of an interface.)\\n\\nThink about how much simpler your code would be if you just went ahead and new\u2019d up a concrete class when you needed it.\u00a0 If you didn\u2019t create an extra interface for it, and then pass it in the constructor.\u00a0 You just used it where you needed it and that was that.\\n\\n<strong>The second benefit is that you won\u2019t spend so much time writing hard unit tests.<\/strong>\u00a0 I know that when I am writing code for a feature I usually spend at least half the amount of time writing unit tests.\u00a0 This is mostly because I am writing level 3 and level 4 unit tests, which require a large number of mocks.\\n\\nMocks kill us.\u00a0 Mocking has a negative ROI.\u00a0 Not only is creating them expensive in terms of time, but it also strongly couples our test classes to the system and makes them very fragile.\u00a0 Plus, mocking adds huge amounts of complexity to unit tests.\u00a0 Mocking usually ends up causing our unit test code to become unreadable, which makes it almost worthless.\\n\\nI\u2019ve been writing mocks for years.\u00a0 I know just about every trick in the book.\u00a0 I can show you how to do it in Java, in C#, even in C++.\u00a0 It is always painful, even with auto-mocking libraries.\\n\\nBy skipping the hard unit tests and finding smart ways to make more classes only require level 1 and level 2 unit tests, you are making your job a whole lot easier and maximizing on the activities that give you a high ROI.\u00a0 Level 1 and level 2 unit tests, in my estimation, give very high ROIs.\\n\\n<strong>The thirds benefit is that blackbox automated tests are the most valuable tests in your entire system and now you\u2019ll be writing more of them.\u00a0 <\/strong>There are many names for these tests, I am calling them BATs now, but basically this is what most companies call automation.\u00a0 Unfortunately, most companies leave this job to a QA automation engineer instead of the development teams.\u00a0 Don\u2019t get me wrong, QA automation engineers are great, but there aren\u2019t many of them, good ones are very expensive, and the responsibility shouldn\u2019t lie squarely on their shoulders.\\n\\nBATs test the whole system working together.\u00a0 BATs are your automated regression tests for the entire system.\u00a0 BATs are automated customer acceptance tests and <strong>the ROI for each line for code in a BAT can be much higher than the ROI of each line of production code.<\/strong>\\n\\nWhy?\u00a0 How is this even possible?\u00a0 It\u2019s all about leverage baby.\u00a0 Each line of code in a BAT may be exercising anywhere from 5 to 500 lines of production code, which is quite the opposite case of a unit test where each line of unit test code might only be testing a 1\/8th or 1\/16th a line of production code on average (depending on code coverage numbers being reached.)\\n\\nI\u2019ll save the detail for later posts, but it is my strong opinion that a majority of a development teams effort should be put in BATs, because BATs\\n\\n<\/p>\n<ul>\\n    <\/p>\n<li>Have high value to the customer<\/li>\n<p>\\n    <\/p>\n<li>Regression test the entire system<\/li>\n<p>\\n    <\/p>\n<li>Have a huge ROI per line of code (if you create a proper BAT framework)<\/li>\n<p>\\n<\/ul>\n<p>\\n\\nImagine how much higher quality your software would be if you had a BAT for each backlog item in your system which you could run every single iteration of your development process.\u00a0 Imagine how confident you would be in making changes to the system, knowing that you have an automated set of tests that will catch almost any break in functionality.\\n\\nDon\u2019t you think that is worth giving up writing level 3 and level 4 unit tests, which are already painful and not very fun to begin with to achieve?\\n\\nIn my future posts on the Back to Basics series, I will cover in-depth how to push more of your code into level 1 and level 2 unit tests by extracting logic out to separate classes that have no dependencies, and I will talk more about BATs, and how to get started and be successful using them.\u00a0 (Hint: you need a good BAT framework.)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you\u2019ve been following me from the beginning of the Back to Basics series, you\u2019ll know that I set out to reevaluate some of the commonly held truths of what best practices are, especially in regards to unit testing, dependency injection and inversion of control containers.\\n\\nWe\u2019ve talked about what an interface is, cohesion and coupling,&#8230;<\/p>\n","protected":false},"author":2,"featured_media":24879,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","footnotes":""},"categories":[44070,2185,148,45348,188921,31679,12,27940,3882,6951],"tags":[],"class_list":["post-1225","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-automation","category-best-practices","category-design","category-frameworks","category-functional","category-process-improvement","category-testing","category-ui","category-unit-testing","category-user"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Unit Testing and Automated Blackbox Testing - Simple Programmer<\/title>\n<meta name=\"description\" content=\"I think unit testing and TDD are very good skills to have. I think everyone should learn them. TDD truly helps you write object oriented code with small concentrated areas of responsibility...\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/simpleprogrammer.com\/back-to-basics-unit-testing-automated-blackbox-testing-and-conclusions\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Unit Testing and Automated Blackbox Testing - Simple Programmer\" \/>\n<meta property=\"og:description\" content=\"I think unit testing and TDD are very good skills to have. I think everyone should learn them. TDD truly helps you write object oriented code with small concentrated areas of responsibility...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/simpleprogrammer.com\/back-to-basics-unit-testing-automated-blackbox-testing-and-conclusions\/\" \/>\n<meta property=\"og:site_name\" content=\"Simple Programmer\" \/>\n<meta property=\"article:published_time\" content=\"2011-01-14T14:24:50+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-01-12T17:18:04+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2011\/01\/Back-to-Basics-Unit-Testing-Automated-Blackbox-Testing-and-Conclusions.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1280\" \/>\n\t<meta property=\"og:image:height\" content=\"720\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"John Sonmez\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"John Sonmez\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/back-to-basics-unit-testing-automated-blackbox-testing-and-conclusions\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/back-to-basics-unit-testing-automated-blackbox-testing-and-conclusions\\\/\"},\"author\":{\"name\":\"John Sonmez\",\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/#\\\/schema\\\/person\\\/1abc70edfb189184827740310672de67\"},\"headline\":\"Unit Testing and Automated Blackbox Testing\",\"datePublished\":\"2011-01-14T14:24:50+00:00\",\"dateModified\":\"2018-01-12T17:18:04+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/back-to-basics-unit-testing-automated-blackbox-testing-and-conclusions\\\/\"},\"wordCount\":1819,\"commentCount\":12,\"image\":{\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/back-to-basics-unit-testing-automated-blackbox-testing-and-conclusions\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/simpleprogrammer.com\\\/wp-content\\\/uploads\\\/2011\\\/01\\\/Back-to-Basics-Unit-Testing-Automated-Blackbox-Testing-and-Conclusions.png\",\"articleSection\":[\"Automation\",\"Best Practices\",\"Design\",\"Frameworks\",\"Functional\",\"Process Improvement\",\"Testing\",\"UI\",\"Unit Testing\",\"User\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/simpleprogrammer.com\\\/back-to-basics-unit-testing-automated-blackbox-testing-and-conclusions\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/back-to-basics-unit-testing-automated-blackbox-testing-and-conclusions\\\/\",\"url\":\"https:\\\/\\\/simpleprogrammer.com\\\/back-to-basics-unit-testing-automated-blackbox-testing-and-conclusions\\\/\",\"name\":\"Unit Testing and Automated Blackbox Testing - Simple Programmer\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/back-to-basics-unit-testing-automated-blackbox-testing-and-conclusions\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/back-to-basics-unit-testing-automated-blackbox-testing-and-conclusions\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/simpleprogrammer.com\\\/wp-content\\\/uploads\\\/2011\\\/01\\\/Back-to-Basics-Unit-Testing-Automated-Blackbox-Testing-and-Conclusions.png\",\"datePublished\":\"2011-01-14T14:24:50+00:00\",\"dateModified\":\"2018-01-12T17:18:04+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/#\\\/schema\\\/person\\\/1abc70edfb189184827740310672de67\"},\"description\":\"I think unit testing and TDD are very good skills to have. I think everyone should learn them. TDD truly helps you write object oriented code with small concentrated areas of responsibility...\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/back-to-basics-unit-testing-automated-blackbox-testing-and-conclusions\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/simpleprogrammer.com\\\/back-to-basics-unit-testing-automated-blackbox-testing-and-conclusions\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/back-to-basics-unit-testing-automated-blackbox-testing-and-conclusions\\\/#primaryimage\",\"url\":\"https:\\\/\\\/simpleprogrammer.com\\\/wp-content\\\/uploads\\\/2011\\\/01\\\/Back-to-Basics-Unit-Testing-Automated-Blackbox-Testing-and-Conclusions.png\",\"contentUrl\":\"https:\\\/\\\/simpleprogrammer.com\\\/wp-content\\\/uploads\\\/2011\\\/01\\\/Back-to-Basics-Unit-Testing-Automated-Blackbox-Testing-and-Conclusions.png\",\"width\":1280,\"height\":720},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/back-to-basics-unit-testing-automated-blackbox-testing-and-conclusions\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/simpleprogrammer.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Unit Testing and Automated Blackbox Testing\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/#website\",\"url\":\"https:\\\/\\\/simpleprogrammer.com\\\/\",\"name\":\"Simple Programmer\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/simpleprogrammer.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/#\\\/schema\\\/person\\\/1abc70edfb189184827740310672de67\",\"name\":\"John Sonmez\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/dc2f18dfa76e017566ce607de002d7abe4acfd5ec19a6db82c180b00867b8d94?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/dc2f18dfa76e017566ce607de002d7abe4acfd5ec19a6db82c180b00867b8d94?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/dc2f18dfa76e017566ce607de002d7abe4acfd5ec19a6db82c180b00867b8d94?s=96&d=mm&r=g\",\"caption\":\"John Sonmez\"},\"url\":\"https:\\\/\\\/simpleprogrammer.com\\\/author\\\/jsonmez\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Unit Testing and Automated Blackbox Testing - Simple Programmer","description":"I think unit testing and TDD are very good skills to have. I think everyone should learn them. TDD truly helps you write object oriented code with small concentrated areas of responsibility...","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:\/\/simpleprogrammer.com\/back-to-basics-unit-testing-automated-blackbox-testing-and-conclusions\/","og_locale":"en_US","og_type":"article","og_title":"Unit Testing and Automated Blackbox Testing - Simple Programmer","og_description":"I think unit testing and TDD are very good skills to have. I think everyone should learn them. TDD truly helps you write object oriented code with small concentrated areas of responsibility...","og_url":"https:\/\/simpleprogrammer.com\/back-to-basics-unit-testing-automated-blackbox-testing-and-conclusions\/","og_site_name":"Simple Programmer","article_published_time":"2011-01-14T14:24:50+00:00","article_modified_time":"2018-01-12T17:18:04+00:00","og_image":[{"width":1280,"height":720,"url":"https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2011\/01\/Back-to-Basics-Unit-Testing-Automated-Blackbox-Testing-and-Conclusions.png","type":"image\/png"}],"author":"John Sonmez","twitter_card":"summary_large_image","twitter_misc":{"Written by":"John Sonmez","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/simpleprogrammer.com\/back-to-basics-unit-testing-automated-blackbox-testing-and-conclusions\/#article","isPartOf":{"@id":"https:\/\/simpleprogrammer.com\/back-to-basics-unit-testing-automated-blackbox-testing-and-conclusions\/"},"author":{"name":"John Sonmez","@id":"https:\/\/simpleprogrammer.com\/#\/schema\/person\/1abc70edfb189184827740310672de67"},"headline":"Unit Testing and Automated Blackbox Testing","datePublished":"2011-01-14T14:24:50+00:00","dateModified":"2018-01-12T17:18:04+00:00","mainEntityOfPage":{"@id":"https:\/\/simpleprogrammer.com\/back-to-basics-unit-testing-automated-blackbox-testing-and-conclusions\/"},"wordCount":1819,"commentCount":12,"image":{"@id":"https:\/\/simpleprogrammer.com\/back-to-basics-unit-testing-automated-blackbox-testing-and-conclusions\/#primaryimage"},"thumbnailUrl":"https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2011\/01\/Back-to-Basics-Unit-Testing-Automated-Blackbox-Testing-and-Conclusions.png","articleSection":["Automation","Best Practices","Design","Frameworks","Functional","Process Improvement","Testing","UI","Unit Testing","User"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/simpleprogrammer.com\/back-to-basics-unit-testing-automated-blackbox-testing-and-conclusions\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/simpleprogrammer.com\/back-to-basics-unit-testing-automated-blackbox-testing-and-conclusions\/","url":"https:\/\/simpleprogrammer.com\/back-to-basics-unit-testing-automated-blackbox-testing-and-conclusions\/","name":"Unit Testing and Automated Blackbox Testing - Simple Programmer","isPartOf":{"@id":"https:\/\/simpleprogrammer.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/simpleprogrammer.com\/back-to-basics-unit-testing-automated-blackbox-testing-and-conclusions\/#primaryimage"},"image":{"@id":"https:\/\/simpleprogrammer.com\/back-to-basics-unit-testing-automated-blackbox-testing-and-conclusions\/#primaryimage"},"thumbnailUrl":"https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2011\/01\/Back-to-Basics-Unit-Testing-Automated-Blackbox-Testing-and-Conclusions.png","datePublished":"2011-01-14T14:24:50+00:00","dateModified":"2018-01-12T17:18:04+00:00","author":{"@id":"https:\/\/simpleprogrammer.com\/#\/schema\/person\/1abc70edfb189184827740310672de67"},"description":"I think unit testing and TDD are very good skills to have. I think everyone should learn them. TDD truly helps you write object oriented code with small concentrated areas of responsibility...","breadcrumb":{"@id":"https:\/\/simpleprogrammer.com\/back-to-basics-unit-testing-automated-blackbox-testing-and-conclusions\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/simpleprogrammer.com\/back-to-basics-unit-testing-automated-blackbox-testing-and-conclusions\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/simpleprogrammer.com\/back-to-basics-unit-testing-automated-blackbox-testing-and-conclusions\/#primaryimage","url":"https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2011\/01\/Back-to-Basics-Unit-Testing-Automated-Blackbox-Testing-and-Conclusions.png","contentUrl":"https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2011\/01\/Back-to-Basics-Unit-Testing-Automated-Blackbox-Testing-and-Conclusions.png","width":1280,"height":720},{"@type":"BreadcrumbList","@id":"https:\/\/simpleprogrammer.com\/back-to-basics-unit-testing-automated-blackbox-testing-and-conclusions\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/simpleprogrammer.com\/"},{"@type":"ListItem","position":2,"name":"Unit Testing and Automated Blackbox Testing"}]},{"@type":"WebSite","@id":"https:\/\/simpleprogrammer.com\/#website","url":"https:\/\/simpleprogrammer.com\/","name":"Simple Programmer","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/simpleprogrammer.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/simpleprogrammer.com\/#\/schema\/person\/1abc70edfb189184827740310672de67","name":"John Sonmez","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/dc2f18dfa76e017566ce607de002d7abe4acfd5ec19a6db82c180b00867b8d94?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/dc2f18dfa76e017566ce607de002d7abe4acfd5ec19a6db82c180b00867b8d94?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/dc2f18dfa76e017566ce607de002d7abe4acfd5ec19a6db82c180b00867b8d94?s=96&d=mm&r=g","caption":"John Sonmez"},"url":"https:\/\/simpleprogrammer.com\/author\/jsonmez\/"}]}},"_links":{"self":[{"href":"https:\/\/simpleprogrammer.com\/wp-json\/wp\/v2\/posts\/1225","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/simpleprogrammer.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/simpleprogrammer.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/simpleprogrammer.com\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/simpleprogrammer.com\/wp-json\/wp\/v2\/comments?post=1225"}],"version-history":[{"count":0,"href":"https:\/\/simpleprogrammer.com\/wp-json\/wp\/v2\/posts\/1225\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/simpleprogrammer.com\/wp-json\/wp\/v2\/media\/24879"}],"wp:attachment":[{"href":"https:\/\/simpleprogrammer.com\/wp-json\/wp\/v2\/media?parent=1225"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/simpleprogrammer.com\/wp-json\/wp\/v2\/categories?post=1225"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/simpleprogrammer.com\/wp-json\/wp\/v2\/tags?post=1225"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}