{"id":765,"date":"2011-12-09T10:56:00","date_gmt":"2011-12-09T10:56:00","guid":{"rendered":"http:\/\/www.javacodegeeks.com\/2012\/10\/some-definitions-testing-techniques-9.html"},"modified":"2012-10-21T20:53:24","modified_gmt":"2012-10-21T20:53:24","slug":"some-definitions-testing-techniques-9","status":"publish","type":"post","link":"https:\/\/www.javacodegeeks.com\/2011\/12\/some-definitions-testing-techniques-9.html","title":{"rendered":"Some Definitions &#8211; Testing Techniques 9"},"content":{"rendered":"<div dir=\"ltr\" style=\"text-align: left\">I think that I\u2019m coming to the end of my series of blogs on testing techniques, and it feels like it\u2019s been along haul. One of the things that has become clearer to me is that approaches to testing are still in their infancy and as such are a definite source of contention or discussion amongst developers &#8211; and that\u2019s a good thing.<\/p>\n<p>I suspect that we are at a point in the history of our profession where the discipline of writing tests is only just gaining ground and will one day be common place and taught as part of elementary programming classes (1). Today\u2019s blog provides a summary of the of the terms used in my previous blogs in this series.<\/p>\n<p><strong>Unit Tests<\/strong><br \/>\nI covered the definition of a unit test in part two of this series of blogs, giving the views of Shane Warden, who in his book <i>The Art of Agile Development<\/i> states that unit tests should run at a rate of \u201chundreds per second\u201d; Michael Feathers, who in his book <i>Working Effectively<\/i> with<i> Legacy Code<\/i> states that a unit test is not a unit test if:<\/p>\n<ol style=\"text-align: left\">\n<li>It talks to a database.<\/li>\n<li>It communicates across a network.<\/li>\n<li>It touches the file system.<\/li>\n<li>You have to do special things to your environment (such as editing configuration files) to run it.<\/li>\n<\/ol>\n<p>I also quoted Roy Osherove, who in his book <i><a href=\"http:\/\/artofunittesting.com\/\"><span class=\"Apple-style-span\" style=\"color: orange\">The Art Of Unit Testing<\/span><\/a><\/i> sums up a good unit test as: &#8220;an automated piece of code that invokes the method or class being tested and then checks some assumptions about the logical behaviour of that method or class. A unit test is almost always written using a unit testing framework. It can be written easily and runs quickly. It&#8217;s fully automated, trustworthy, readable and maintainable&#8221;.<\/p>\n<p>Unit tests can be summed up using the <a href=\"http:\/\/www.captaindebug.com\/2011\/05\/unit-tests-and-first-acronym.html\"><span class=\"Apple-style-span\" style=\"color: orange\">FIRST<\/span><\/a> acronym: Fast, Independent, Repeatable, Self Validating and Timely.<\/p>\n<p><strong>When to Use Unit Tests<\/strong><br \/>\nUnit tests are the bread and butter of testing. If you employ Test Driven Development, TDD, then you write failing tests before you write your production code. If you don\u2019t use TDD, then at least write your tests at the same time as your production code i.e. write a method and then write its tests. This technique doesn\u2019t involve the paradigm shift that accompanies TDD, but it\u2019s much better than writing tests after you\u2019ve written all the code, which is usually considered tedious by developers. There should be one test for every scenario, which translated into plain English means every path through your code: both sides of every <span class=\"Apple-style-span\" style=\"font-family: 'Courier New', Courier, monospace\">if<\/span> statement and every case of a <span class=\"Apple-style-span\" style=\"font-family: 'Courier New', Courier, monospace\">switch<\/span> statement. In short, every project should have hundreds of Unit Tests and you should have the confidence that if you change a part of the code then you won\u2019t break something.<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<p><strong>Stubs<\/strong><br \/>\nStubs are used to isolate an object under test from the rest of the system. They are objects that are injected into your object to replace real objects in test situations. Martin Fowler defines stubs, in his essay Mocks Aren\u2019t Stubs as:<\/p>\n<p>\u201cStubs provide canned answers to calls made during the test, usually not responding at all to anything outside what&#8217;s programmed in for the test. Stubs may also record information about calls, such as an email gateway stub that remembers the messages it &#8216;sent&#8217;, or maybe only how many messages it &#8216;sent&#8217;\u201d<\/p>\n<p>&#8230;whilst a similar definition, taken from <a href=\"http:\/\/artofunittesting.com\/\"><span class=\"Apple-style-span\" style=\"color: orange\"><i>The Art of Unit Testing<\/i><\/span><\/a> is: <\/p>\n<p>\u201cA stub is a controllable replacement for an existing dependency (or <i>collaborator<\/i>) in the system. By using stub, you can test your code without using the dependency directly.\u201d<\/p>\n<p><strong>Mocks<\/strong><br \/>\nMocks are replacement objects used to imitate, or mock, the behaviour or roles of production objects. This really means checking that an object under test calls methods on a mock object as expected with the test failing if it doesn\u2019t; hence, you\u2019re asserting on the correctness of method calls and the execution path through your code, rather than, in the case of a regular unit test, the return value of the method under test.<\/p>\n<p>Integration Tests<br \/>\nIntegration tests are the opposite of unit tests. The idea behind integration tests is to prove that your objects collaborate with each other and the system around them. To paraphrase Michael Feathers, integration tests <strong>CAN<\/strong>:<\/p>\n<ol style=\"text-align: left\">\n<li>talk to a database.<\/li>\n<li>communicate across a network.<\/li>\n<li>touch the file system.<\/li>\n<li>require you to do special things to your environment (such as editing configuration files) to run it.<\/li>\n<\/ol>\n<p>Roy Osherove in the Art of Unit Testing states that an \u201cintegration test means testing two or more or more dependent software modules together as a group\u201d. For me this constrains the definition a little too much after all, in testing objects in a single module you can access a database or file system whilst figuring out if your objects can collaborate.<\/p>\n<p>In projects I\u2019ve previously worked on, there\u2019s usually been a module specifically written to hold integration tests. This is because integration tests are less numerous than unit tests (perhaps at a ratio of 1:10) and, by virtue of the fact that they access their environment, are usually substantially slower and therefore corralling all integration tests into their own Maven module means that they don\u2019t have to run every time you build a module, speeding up build and development time.<\/p>\n<p><strong>End to End Integration Tests<\/strong><br \/>\nI\u2019ve covered End to End tests in detail in the second blog in this series, so to summarise, they can be defined as a special case of integration tests in that the test commences at, or just behind, a system boundary and executes through all layers of the system. Where the system boundary, or just behind the system boundary is a matter for debate. In terms of a Spring MVC app, there\u2019s no reason why an end to end test shouldn\u2019t start at your controller code ignoring the browser and dispatcher servlet. After all, I suspect that the Guys at Spring have tested their code thoroughly, so why should you waste time testing it? Also, testing what the front end looks like s a whole different kettle of fish.<\/p>\n<p>(1) I often suspect that testing techniques are not actually taught in collages and universities &#8211; but I\u2019ve no evidence of this. If there are any academics out there who can tell me that unit testing is taught, encouraged and an integral part of their Computer Science Degree courses then I\u2019d be happy to hear from them.<\/p>\n<p><strong><i>Reference: <\/i><\/strong><a href=\"http:\/\/www.captaindebug.com\/2011\/12\/some-definitions-testing-techniques-9.html\">Some Definitions &#8211; Testing Techniques 9<\/a> from our <a href=\"http:\/\/www.javacodegeeks.com\/p\/jcg.html\">JCG partner<\/a>&nbsp;&nbsp;Roger Hughes&nbsp;at the&nbsp;<a href=\"http:\/\/www.captaindebug.com\/\">Captain Debug&#8217;s Blog<\/a>.<\/p>\n<p><strong><i>Related Articles :<\/i><\/strong><\/p>\n<ul>\n<li><a href=\"http:\/\/www.javacodegeeks.com\/2011\/11\/testing-techniques-not-writing-tests.html\">Testing Techniques &#8211; Not Writing Tests<\/a><\/li>\n<li><a href=\"http:\/\/www.javacodegeeks.com\/2011\/11\/misuse-of-end-to-end-tests-testing.html\">The Misuse of End To End Tests &#8211; Testing Techniques 2<\/a><\/li>\n<li><a href=\"http:\/\/www.javacodegeeks.com\/2011\/11\/what-should-you-unit-test-testing.html\">What Should you Unit Test? &#8211; Testing Techniques 3<\/a><\/li>\n<li><a href=\"http:\/\/www.javacodegeeks.com\/2011\/11\/regular-unit-tests-and-stubs-testing.html\">Regular Unit Tests and Stubs &#8211; Testing Techniques 4<\/a><\/li>\n<li><a href=\"http:\/\/www.javacodegeeks.com\/2011\/11\/unit-testing-using-mocks-testing.html\">Unit Testing Using Mocks &#8211; Testing Techniques 5<\/a><\/li>\n<li><a href=\"http:\/\/www.javacodegeeks.com\/2011\/11\/creating-stubs-for-legacy-code-testing.html\">Creating Stubs for Legacy Code &#8211; Testing Techniques 6<\/a><\/li>\n<li><a href=\"http:\/\/www.javacodegeeks.com\/2011\/12\/more-on-creating-stubs-for-legacy-code.html#more\">More on Creating Stubs for Legacy Code &#8211; Testing Techniques 7<\/a><\/li>\n<li><a href=\"http:\/\/www.javacodegeeks.com\/2011\/12\/why-you-should-write-unit-tests-testing.html\">Why You Should Write Unit Tests &#8211; Testing Techniques 8<\/a><\/li>\n<\/ul>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>I think that I\u2019m coming to the end of my series of blogs on testing techniques, and it feels like it\u2019s been along haul. One of the things that has become clearer to me is that approaches to testing are still in their infancy and as such are a definite source of contention or discussion &hellip;<\/p>\n","protected":false},"author":65,"featured_media":176,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[274,314,273],"class_list":["post-765","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-enterprise-java","tag-junit","tag-mock","tag-testing"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Some Definitions - Testing Techniques 9 - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"I think that I\u2019m coming to the end of my series of blogs on testing techniques, and it feels like it\u2019s been along haul. One of the things that has become\" \/>\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\/2011\/12\/some-definitions-testing-techniques-9.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Some Definitions - Testing Techniques 9 - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"I think that I\u2019m coming to the end of my series of blogs on testing techniques, and it feels like it\u2019s been along haul. One of the things that has become\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.javacodegeeks.com\/2011\/12\/some-definitions-testing-techniques-9.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=\"2011-12-09T10:56:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2012-10-21T20:53:24+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/junit-logo-e1426444701180.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=\"Roger Hughes\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Roger Hughes\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2011\\\/12\\\/some-definitions-testing-techniques-9.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2011\\\/12\\\/some-definitions-testing-techniques-9.html\"},\"author\":{\"name\":\"Roger Hughes\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/c9feacaf8e783104a69621cd65bf1f07\"},\"headline\":\"Some Definitions &#8211; Testing Techniques 9\",\"datePublished\":\"2011-12-09T10:56:00+00:00\",\"dateModified\":\"2012-10-21T20:53:24+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2011\\\/12\\\/some-definitions-testing-techniques-9.html\"},\"wordCount\":1188,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2011\\\/12\\\/some-definitions-testing-techniques-9.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/junit-logo-e1426444701180.jpg\",\"keywords\":[\"JUnit\",\"Mock\",\"Testing\"],\"articleSection\":[\"Enterprise Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2011\\\/12\\\/some-definitions-testing-techniques-9.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2011\\\/12\\\/some-definitions-testing-techniques-9.html\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2011\\\/12\\\/some-definitions-testing-techniques-9.html\",\"name\":\"Some Definitions - Testing Techniques 9 - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2011\\\/12\\\/some-definitions-testing-techniques-9.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2011\\\/12\\\/some-definitions-testing-techniques-9.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/junit-logo-e1426444701180.jpg\",\"datePublished\":\"2011-12-09T10:56:00+00:00\",\"dateModified\":\"2012-10-21T20:53:24+00:00\",\"description\":\"I think that I\u2019m coming to the end of my series of blogs on testing techniques, and it feels like it\u2019s been along haul. One of the things that has become\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2011\\\/12\\\/some-definitions-testing-techniques-9.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2011\\\/12\\\/some-definitions-testing-techniques-9.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2011\\\/12\\\/some-definitions-testing-techniques-9.html#primaryimage\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/junit-logo-e1426444701180.jpg\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/junit-logo-e1426444701180.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2011\\\/12\\\/some-definitions-testing-techniques-9.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\":\"Some Definitions &#8211; Testing Techniques 9\"}]},{\"@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\\\/c9feacaf8e783104a69621cd65bf1f07\",\"name\":\"Roger Hughes\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/db9d1e5362dbc3f8007b383b852473b59fb8c5282a6066a13ab1cef761a9d5d6?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/db9d1e5362dbc3f8007b383b852473b59fb8c5282a6066a13ab1cef761a9d5d6?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/db9d1e5362dbc3f8007b383b852473b59fb8c5282a6066a13ab1cef761a9d5d6?s=96&d=mm&r=g\",\"caption\":\"Roger Hughes\"},\"sameAs\":[\"http:\\\/\\\/www.captaindebug.com\\\/\"],\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/author\\\/Roger-Hughes\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Some Definitions - Testing Techniques 9 - Java Code Geeks","description":"I think that I\u2019m coming to the end of my series of blogs on testing techniques, and it feels like it\u2019s been along haul. One of the things that has become","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\/2011\/12\/some-definitions-testing-techniques-9.html","og_locale":"en_US","og_type":"article","og_title":"Some Definitions - Testing Techniques 9 - Java Code Geeks","og_description":"I think that I\u2019m coming to the end of my series of blogs on testing techniques, and it feels like it\u2019s been along haul. One of the things that has become","og_url":"https:\/\/www.javacodegeeks.com\/2011\/12\/some-definitions-testing-techniques-9.html","og_site_name":"Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2011-12-09T10:56:00+00:00","article_modified_time":"2012-10-21T20:53:24+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/junit-logo-e1426444701180.jpg","type":"image\/jpeg"}],"author":"Roger Hughes","twitter_card":"summary_large_image","twitter_creator":"@javacodegeeks","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Roger Hughes","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.javacodegeeks.com\/2011\/12\/some-definitions-testing-techniques-9.html#article","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/2011\/12\/some-definitions-testing-techniques-9.html"},"author":{"name":"Roger Hughes","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/c9feacaf8e783104a69621cd65bf1f07"},"headline":"Some Definitions &#8211; Testing Techniques 9","datePublished":"2011-12-09T10:56:00+00:00","dateModified":"2012-10-21T20:53:24+00:00","mainEntityOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2011\/12\/some-definitions-testing-techniques-9.html"},"wordCount":1188,"commentCount":0,"publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2011\/12\/some-definitions-testing-techniques-9.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/junit-logo-e1426444701180.jpg","keywords":["JUnit","Mock","Testing"],"articleSection":["Enterprise Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.javacodegeeks.com\/2011\/12\/some-definitions-testing-techniques-9.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/2011\/12\/some-definitions-testing-techniques-9.html","url":"https:\/\/www.javacodegeeks.com\/2011\/12\/some-definitions-testing-techniques-9.html","name":"Some Definitions - Testing Techniques 9 - Java Code Geeks","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2011\/12\/some-definitions-testing-techniques-9.html#primaryimage"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2011\/12\/some-definitions-testing-techniques-9.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/junit-logo-e1426444701180.jpg","datePublished":"2011-12-09T10:56:00+00:00","dateModified":"2012-10-21T20:53:24+00:00","description":"I think that I\u2019m coming to the end of my series of blogs on testing techniques, and it feels like it\u2019s been along haul. One of the things that has become","breadcrumb":{"@id":"https:\/\/www.javacodegeeks.com\/2011\/12\/some-definitions-testing-techniques-9.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.javacodegeeks.com\/2011\/12\/some-definitions-testing-techniques-9.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/2011\/12\/some-definitions-testing-techniques-9.html#primaryimage","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/junit-logo-e1426444701180.jpg","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/junit-logo-e1426444701180.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.javacodegeeks.com\/2011\/12\/some-definitions-testing-techniques-9.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":"Some Definitions &#8211; Testing Techniques 9"}]},{"@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\/c9feacaf8e783104a69621cd65bf1f07","name":"Roger Hughes","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/db9d1e5362dbc3f8007b383b852473b59fb8c5282a6066a13ab1cef761a9d5d6?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/db9d1e5362dbc3f8007b383b852473b59fb8c5282a6066a13ab1cef761a9d5d6?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/db9d1e5362dbc3f8007b383b852473b59fb8c5282a6066a13ab1cef761a9d5d6?s=96&d=mm&r=g","caption":"Roger Hughes"},"sameAs":["http:\/\/www.captaindebug.com\/"],"url":"https:\/\/www.javacodegeeks.com\/author\/Roger-Hughes"}]}},"_links":{"self":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/765","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\/65"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=765"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/765\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media\/176"}],"wp:attachment":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=765"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=765"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=765"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}