{"id":682,"date":"2011-11-18T13:29:00","date_gmt":"2011-11-18T13:29:00","guid":{"rendered":"http:\/\/www.javacodegeeks.com\/2012\/10\/the-misuse-of-end-to-end-tests-testing-techniques-2.html"},"modified":"2012-10-21T20:38:37","modified_gmt":"2012-10-21T20:38:37","slug":"misuse-of-end-to-end-tests-testing","status":"publish","type":"post","link":"https:\/\/www.javacodegeeks.com\/2011\/11\/misuse-of-end-to-end-tests-testing.html","title":{"rendered":"The Misuse of End To End Tests &#8211; Testing Techniques 2"},"content":{"rendered":"<div dir=\"ltr\" style=\"text-align: left\">My <a href=\"http:\/\/www.javacodegeeks.com\/2011\/11\/testing-techniques-not-writing-tests.html\">last blog<\/a> was the first in a series of blogs on approaches to testing code, outlining a simple scenario of retrieving an address from a database using a very common pattern:<\/p>\n<div class=\"separator\" style=\"clear: both;text-align: center\"><a href=\"http:\/\/3.bp.blogspot.com\/-yH4AkqVLOAg\/TrvNnaMIzKI\/AAAAAAAAAXk\/6xOz3GWqj9U\/s320\/Screen+Shot+2011-11-10+at+12.58.52.png\"><img decoding=\"async\" border=\"0\" src=\"http:\/\/3.bp.blogspot.com\/-yH4AkqVLOAg\/TrvNnaMIzKI\/AAAAAAAAAXk\/6xOz3GWqj9U\/s320\/Screen+Shot+2011-11-10+at+12.58.52.png\" \/><\/a><\/div>\n<p>&#8230;and describing a very common testing technique: <i>not writing tests<\/i> and doing everything manually.<\/p>\n<p>Today\u2019s blog covers another practise which I also feel is sub-optimal. In this scenario, the developers use JUnit to write tests, but write them after they have completed writing the code and without any class isolation. This is really an \u2018End to End\u2019 (aka Integration) test posing as a Unit Test.<\/p>\n<p>Although yesterday I said that I\u2019m only testing the AddressService class, a test using this technique starts by loading the database with some test data and then grabbing hold of the <strong>AddressController<\/strong> to call the method under test. The <strong>AddressController<\/strong> calls the <strong>AddressService<\/strong> which then calls the <strong>AddressDao<\/strong> to obtain and return the requested data.<\/p>\n<pre class=\"brush: java;\">@RunWith(UnitilsJUnit4TestClassRunner.class)\r\n@SpringApplicationContext(\"servlet-context.xml\")\r\n@Transactional(TransactionMode.DISABLED)\r\npublic class EndToEndAddressServiceTest {\r\n\r\n  @SpringBeanByType\r\n  private AddressController instance;\r\n\r\n  \/**\r\n   * Test method for\r\n   * {@link com.captaindebug.address.AddressService#findAddress(int)}.\r\n   *\/\r\n  @Test\r\n  public void testFindAddressWithNoAddress() {\r\n\r\n    final int id = 10;\r\n    BindingAwareModelMap model = new BindingAwareModelMap();\r\n\r\n    String result = instance.findAddress(id, model);\r\n    assertEquals(\"address-display\", result);\r\n\r\n    Address resultAddress = (Address) model.get(\"address\");\r\n    assertEquals(Address.INVALID_ADDRESS, resultAddress);\r\n  }\r\n\r\n  \/**\r\n   * Test method for\r\n   * {@link com.captaindebug.address.AddressService#findAddress(int)}.\r\n   *\/\r\n  @Test\r\n  @DataSet(\"FindAddress.xml\")\r\n  public void testFindAddress() {\r\n\r\n    final int id = 1;\r\n    Address expected = new Address(id, \"15 My Street\", \"My Town\",\r\n        \"POSTCODE\", \"My Country\");\r\n\r\n    BindingAwareModelMap model = new BindingAwareModelMap();\r\n\r\n    String result = instance.findAddress(id, model);\r\n    assertEquals(\"address-display\", result);\r\n\r\n    Address resultAddress = (Address) model.get(\"address\");\r\n    assertEquals(expected.getId(), resultAddress.getId());\r\n    assertEquals(expected.getStreet(), resultAddress.getStreet());\r\n    assertEquals(expected.getTown(), resultAddress.getTown());\r\n    assertEquals(expected.getPostCode(), resultAddress.getPostCode());\r\n    assertEquals(expected.getCountry(), resultAddress.getCountry());\r\n  }\r\n}\r\n<\/pre>\n<p>The code above uses <a href=\"http:\/\/www.unitils.org\/summary.html\">Unitils<\/a> to both load the test data into a database and to load the classes in our Spring context. I find Untils a useful tool that takes the hard work out of writing tests like this and having to setup such a large scale test is hard work.<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<p>This kind of test has to be written after the code has been completed; it\u2019s NOT Test Driven Development (which from previous blogs, you\u2019ll gather I\u2019m a big fan), and it\u2019s not a unit test. One of the problems with writing a test <i>after<\/i> the code is that developers who have to do it see it as a chore rather than as part of development, which means that it\u2019s often rushed and not done in the neatest of coding styles.<\/p>\n<p>You\u2019ll also need a certain amount of infrastructure to code using this technique, as a database needs setting up, which may or may not be on your local machine and consequently you may have to be connected to a network to run the test. Test data is either held in test files (as in this case), which are loaded into the database when the test runs, or held permanently in the database. If a requirement change forces a change in the test, then the database files will usually need updating together with the test code, which forces you to update the test in at least two places. <\/p>\n<p>Another big problem with this kind of test, apart from the lack of test subject isolation, is that fact that they can be very slow, sometimes taking seconds to execute. Shane Warden in his book \u2018The Art of Agile Development\u2019 states that unit tests should run at a rate of \u201chundreds per second\u201d. Warden also goes on to cite Michael Feather\u2019s book <i>Working Effectively with Legacy Code<\/i> for a good definition of what a unit test, or is not:<\/p>\n<p>A 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>&#8230;now I like that.<\/p>\n<p><span class=\"Apple-style-span\" style=\"background-color: #a2c4c9\">&#8230;although I don\u2019t necessarily agree with point three. One of the main tenants of good unit test code is Readability. Method arguments that are passed to objects under test are sometimes large in size, especially when they\u2019re XML. In this case I think that it\u2019s more pragmatic to favour test readability and store data of this size in a data file rather than having it as a private static final String, so I only adhere to point three where ever practical.<\/span><\/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\">FIRST<\/a> acronym: Fast, Independent, Repeatable, Self Validating and Timely, whilst Roy Osherove in his book <a href=\"http:\/\/artofunittesting.com\/\">The Art Of Unit Testing<\/a> 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 full automated, trustworthy, readable and maintainable&#8221;.<\/p>\n<p>The benefit of an End to End test is that they do test your test subject in collaboration with other objects and surroundings, something that you really <strong>must<\/strong> before shipping your code. This means that when complete, you code should comprise of <i>hundreds<\/i> of unit tests, but only tens of \u2018End to End\u2019 tests.<\/p>\n<p>Given this, then my introductory premise, when I said that is technique is \u2018sub-optimal\u2019, is not strictly true; there\u2019s nothing wrong with \u2018End to End\u2019 tests, every project should have some together with some ordinary integration tests, but these kinds of tests shouldn\u2019t replace, or be called unit tests, which is often the case.<\/p>\n<p>Having defined what a unit test is, my next blog investigates what you should test and why&#8230;<\/p>\n<p><strong><i>Reference: <\/i><\/strong><a href=\"http:\/\/www.captaindebug.com\/2011\/11\/misuse-of-end-to-end-tests-testing.html\">The Misuse of End To End Tests &#8211; Testing Techniques 2<\/a> from our <a href=\"http:\/\/www.javacodegeeks.com\/p\/jcg.html\">JCG partner<\/a> <span class=\"post-author vcard\"><span class=\"fn\">Roger Hughes <\/span><\/span>at the <a href=\"http:\/\/www.captaindebug.com\/\">Captain Debug 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\/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 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<li><a href=\"http:\/\/www.javacodegeeks.com\/2011\/12\/some-definitions-testing-techniques-9.html\">Some Definitions &#8211; Testing Techniques 9<\/a><\/li>\n<li><a href=\"http:\/\/www.javacodegeeks.com\/2011\/02\/using-findbugs-to-produce-substantially.html\">Using FindBugs to produce substantially less buggy code<\/a><\/li>\n<li><a href=\"http:\/\/www.javacodegeeks.com\/2011\/07\/developing-and-testing-in-cloud.html\">Developing and Testing in the Cloud<\/a><\/li>\n<\/ul>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>My last blog was the first in a series of blogs on approaches to testing code, outlining a simple scenario of retrieving an address from a database using a very common pattern: &#8230;and describing a very common testing technique: not writing tests and doing everything manually. Today\u2019s blog covers another practise which I also feel &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,273],"class_list":["post-682","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-enterprise-java","tag-junit","tag-testing"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>The Misuse of End To End Tests - Testing Techniques 2 - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"My last blog was the first in a series of blogs on approaches to testing code, outlining a simple scenario of retrieving an address from a database using\" \/>\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\/11\/misuse-of-end-to-end-tests-testing.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"The Misuse of End To End Tests - Testing Techniques 2 - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"My last blog was the first in a series of blogs on approaches to testing code, outlining a simple scenario of retrieving an address from a database using\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.javacodegeeks.com\/2011\/11\/misuse-of-end-to-end-tests-testing.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-11-18T13:29:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2012-10-21T20:38:37+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=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2011\\\/11\\\/misuse-of-end-to-end-tests-testing.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2011\\\/11\\\/misuse-of-end-to-end-tests-testing.html\"},\"author\":{\"name\":\"Roger Hughes\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/c9feacaf8e783104a69621cd65bf1f07\"},\"headline\":\"The Misuse of End To End Tests &#8211; Testing Techniques 2\",\"datePublished\":\"2011-11-18T13:29:00+00:00\",\"dateModified\":\"2012-10-21T20:38:37+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2011\\\/11\\\/misuse-of-end-to-end-tests-testing.html\"},\"wordCount\":933,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2011\\\/11\\\/misuse-of-end-to-end-tests-testing.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/junit-logo-e1426444701180.jpg\",\"keywords\":[\"JUnit\",\"Testing\"],\"articleSection\":[\"Enterprise Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2011\\\/11\\\/misuse-of-end-to-end-tests-testing.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2011\\\/11\\\/misuse-of-end-to-end-tests-testing.html\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2011\\\/11\\\/misuse-of-end-to-end-tests-testing.html\",\"name\":\"The Misuse of End To End Tests - Testing Techniques 2 - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2011\\\/11\\\/misuse-of-end-to-end-tests-testing.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2011\\\/11\\\/misuse-of-end-to-end-tests-testing.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/junit-logo-e1426444701180.jpg\",\"datePublished\":\"2011-11-18T13:29:00+00:00\",\"dateModified\":\"2012-10-21T20:38:37+00:00\",\"description\":\"My last blog was the first in a series of blogs on approaches to testing code, outlining a simple scenario of retrieving an address from a database using\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2011\\\/11\\\/misuse-of-end-to-end-tests-testing.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2011\\\/11\\\/misuse-of-end-to-end-tests-testing.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2011\\\/11\\\/misuse-of-end-to-end-tests-testing.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\\\/11\\\/misuse-of-end-to-end-tests-testing.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\":\"The Misuse of End To End Tests &#8211; Testing Techniques 2\"}]},{\"@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":"The Misuse of End To End Tests - Testing Techniques 2 - Java Code Geeks","description":"My last blog was the first in a series of blogs on approaches to testing code, outlining a simple scenario of retrieving an address from a database using","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\/11\/misuse-of-end-to-end-tests-testing.html","og_locale":"en_US","og_type":"article","og_title":"The Misuse of End To End Tests - Testing Techniques 2 - Java Code Geeks","og_description":"My last blog was the first in a series of blogs on approaches to testing code, outlining a simple scenario of retrieving an address from a database using","og_url":"https:\/\/www.javacodegeeks.com\/2011\/11\/misuse-of-end-to-end-tests-testing.html","og_site_name":"Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2011-11-18T13:29:00+00:00","article_modified_time":"2012-10-21T20:38:37+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":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.javacodegeeks.com\/2011\/11\/misuse-of-end-to-end-tests-testing.html#article","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/2011\/11\/misuse-of-end-to-end-tests-testing.html"},"author":{"name":"Roger Hughes","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/c9feacaf8e783104a69621cd65bf1f07"},"headline":"The Misuse of End To End Tests &#8211; Testing Techniques 2","datePublished":"2011-11-18T13:29:00+00:00","dateModified":"2012-10-21T20:38:37+00:00","mainEntityOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2011\/11\/misuse-of-end-to-end-tests-testing.html"},"wordCount":933,"commentCount":0,"publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2011\/11\/misuse-of-end-to-end-tests-testing.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/junit-logo-e1426444701180.jpg","keywords":["JUnit","Testing"],"articleSection":["Enterprise Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.javacodegeeks.com\/2011\/11\/misuse-of-end-to-end-tests-testing.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/2011\/11\/misuse-of-end-to-end-tests-testing.html","url":"https:\/\/www.javacodegeeks.com\/2011\/11\/misuse-of-end-to-end-tests-testing.html","name":"The Misuse of End To End Tests - Testing Techniques 2 - Java Code Geeks","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2011\/11\/misuse-of-end-to-end-tests-testing.html#primaryimage"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2011\/11\/misuse-of-end-to-end-tests-testing.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/junit-logo-e1426444701180.jpg","datePublished":"2011-11-18T13:29:00+00:00","dateModified":"2012-10-21T20:38:37+00:00","description":"My last blog was the first in a series of blogs on approaches to testing code, outlining a simple scenario of retrieving an address from a database using","breadcrumb":{"@id":"https:\/\/www.javacodegeeks.com\/2011\/11\/misuse-of-end-to-end-tests-testing.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.javacodegeeks.com\/2011\/11\/misuse-of-end-to-end-tests-testing.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/2011\/11\/misuse-of-end-to-end-tests-testing.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\/11\/misuse-of-end-to-end-tests-testing.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":"The Misuse of End To End Tests &#8211; Testing Techniques 2"}]},{"@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\/682","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=682"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/682\/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=682"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=682"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=682"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}