{"id":1269,"date":"2010-07-14T22:52:59","date_gmt":"2010-07-14T17:22:59","guid":{"rendered":"https:\/\/2thenew.online\/blog\/?p=1269"},"modified":"2015-07-06T13:41:37","modified_gmt":"2015-07-06T08:11:37","slug":"tips-for-agile-development-with-unit-testing-approach","status":"publish","type":"post","link":"https:\/\/2thenew.online\/blog\/tips-for-agile-development-with-unit-testing-approach\/","title":{"rendered":"Tips for Agile Development with Unit Testing approach."},"content":{"rendered":"<p>This is more towards the best practices and <a href=\"https:\/\/2thenew.online\/grails-application-development\">my experiences for developing an application<\/a> at a faster rate.<\/p>\n<p>In my current project, we are using many different APIs (for external services). And usually it takes time to explore, implement and then stabilize the application. Also, it&#8217;s not over once you stabilize your APIs based code. Because there are possibilities to have unexpected results such as server side errors, broken request, broken response, etc. Also you never know when Service provider makes some changes and your code breaks.<\/p>\n<p>Well, here are some tips which really helped me to achieve faster implementation and more stable application (esp. when working with third party APIs).<\/p>\n<p><strong>TRY TO MAKE YOUR CODE UNIT TESTABLE<\/strong> as much as possible.<\/p>\n<p>1. Create Service layer for API based implementation. Keep this service layer independent from other application. So that you should run it without any other dependency.<\/p>\n<p>2. Try to make small chunks of code (in form of methods) with least dependency on external things.<br \/>\nAvoid Domain\/Database\/Environment specific code. In other words, don&#8217;t put any kind of framework specific dependency. In some cases you can&#8217;t avoid. But try to avoid as much as possible. Because it could lead to integration testing and which again takes more time. Unit test is the fastest way to check your code stability.<\/p>\n<p>3. In case you have some dependencies (and that can not be avoided) &#8211; Try to mock it up. In many cases it&#8217;s possible. If you are using Grails\/Groovy kind of framework\/language &#8211; you have an edge to take an advantage of meta-programming.<\/p>\n<p>4. There is no specific way to do this. But it comes with practice. You can follow above tips to implement your Service Layer Code. And then create unit tests &#8211; invoke your API based service methods. And run it. Wow.. that&#8217;s it.<\/p>\n<p><strong>Advantages:<\/strong><br \/>\nIf there&#8217;s any kind of changes (from service provider), that can break your application&#8217;s functionality, test driven development will work as a &#8220;Life Saver&#8221;. It can tell you where&#8217;s the problem and why it happened. And you can make appropriate changes to stabilize it again.<\/p>\n<p><strong>Same thing implements when you develop a new feature<\/strong>. Unit Test Case helps you see the results in few seconds. Instead of waiting for 10-15 minutes (until application starts).<\/p>\n<p>Isn&#8217;t it cool?<\/p>\n<p>I really appreciate this approach. Hope others will also use it.<\/p>\n<p>Thanks<br \/>\nSalil Kalia<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is more towards the best practices and my experiences for developing an application at a faster rate. In my current project, we are using many different APIs (for external services). And usually it takes time to explore, implement and then stabilize the application. Also, it&#8217;s not over once you stabilize your APIs based code. [&hellip;]<\/p>\n","protected":false},"author":17,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":3,"footnotes":""},"categories":[7],"tags":[324,323,325,272],"class_list":["post-1269","post","type-post","status-publish","format-standard","hentry","category-grails","tag-agile","tag-apis","tag-coding-practices","tag-unit-test"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.0.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"This is more towards the best practices and my experiences for developing an application at a faster rate. In my current project, we are using many different APIs (for external services). And usually it takes time to explore, implement and then stabilize the application. Also, it&#039;s not over once you stabilize your APIs based code.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Salil\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/2thenew.online\/blog\/tips-for-agile-development-with-unit-testing-approach\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.0.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"TO THE NEW BLOG\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Tips for Agile Development with Unit Testing approach. | TO THE NEW Blog\" \/>\n\t\t<meta property=\"og:description\" content=\"This is more towards the best practices and my experiences for developing an application at a faster rate. In my current project, we are using many different APIs (for external services). And usually it takes time to explore, implement and then stabilize the application. Also, it&#039;s not over once you stabilize your APIs based code.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/2thenew.online\/blog\/tips-for-agile-development-with-unit-testing-approach\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/2thenew.online\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/2thenew.online\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta property=\"article:tag\" content=\"grails\" \/>\n\t\t<meta property=\"article:tag\" content=\"agile\" \/>\n\t\t<meta property=\"article:tag\" content=\"apis\" \/>\n\t\t<meta property=\"article:tag\" content=\"coding-practices\" \/>\n\t\t<meta property=\"article:tag\" content=\"unit-test\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2010-07-14T17:22:59+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2015-07-06T08:11:37+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@tothenew\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Tips for Agile Development with Unit Testing approach. | TO THE NEW Blog\" \/>\n\t\t<meta name=\"twitter:description\" content=\"This is more towards the best practices and my experiences for developing an application at a faster rate. In my current project, we are using many different APIs (for external services). And usually it takes time to explore, implement and then stabilize the application. Also, it&#039;s not over once you stabilize your APIs based code.\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/2thenew.online\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/tips-for-agile-development-with-unit-testing-approach\\\/#article\",\"name\":\"Tips for Agile Development with Unit Testing approach. | TO THE NEW Blog\",\"headline\":\"Tips for Agile Development with Unit Testing approach.\",\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/salil\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"},\"datePublished\":\"2010-07-14T22:52:59+05:30\",\"dateModified\":\"2015-07-06T13:41:37+05:30\",\"inLanguage\":\"en-US\",\"commentCount\":1,\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/tips-for-agile-development-with-unit-testing-approach\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/tips-for-agile-development-with-unit-testing-approach\\\/#webpage\"},\"articleSection\":\"Grails, agile, APIs, coding-practices, unit-test\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/tips-for-agile-development-with-unit-testing-approach\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/grails\\\/#listItem\",\"name\":\"Grails\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/grails\\\/#listItem\",\"position\":2,\"name\":\"Grails\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/grails\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/tips-for-agile-development-with-unit-testing-approach\\\/#listItem\",\"name\":\"Tips for Agile Development with Unit Testing approach.\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/tips-for-agile-development-with-unit-testing-approach\\\/#listItem\",\"position\":3,\"name\":\"Tips for Agile Development with Unit Testing approach.\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/grails\\\/#listItem\",\"name\":\"Grails\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\",\"name\":\"TO THE NEW Blog\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/salil\\\/#author\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/salil\\\/\",\"name\":\"Salil\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/tips-for-agile-development-with-unit-testing-approach\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/97e216cba95b296d5909ad7b93d1c338d0fdad7b95410c9412b126a90f4735d9?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Salil\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/tips-for-agile-development-with-unit-testing-approach\\\/#webpage\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/tips-for-agile-development-with-unit-testing-approach\\\/\",\"name\":\"Tips for Agile Development with Unit Testing approach. | TO THE NEW Blog\",\"description\":\"This is more towards the best practices and my experiences for developing an application at a faster rate. In my current project, we are using many different APIs (for external services). And usually it takes time to explore, implement and then stabilize the application. Also, it's not over once you stabilize your APIs based code.\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/tips-for-agile-development-with-unit-testing-approach\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/salil\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/salil\\\/#author\"},\"datePublished\":\"2010-07-14T22:52:59+05:30\",\"dateModified\":\"2015-07-06T13:41:37+05:30\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\",\"name\":\"TO THE NEW Blog\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Tips for Agile Development with Unit Testing approach. | TO THE NEW Blog","description":"This is more towards the best practices and my experiences for developing an application at a faster rate. In my current project, we are using many different APIs (for external services). And usually it takes time to explore, implement and then stabilize the application. Also, it's not over once you stabilize your APIs based code.","canonical_url":"https:\/\/2thenew.online\/blog\/tips-for-agile-development-with-unit-testing-approach\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/2thenew.online\/blog\/tips-for-agile-development-with-unit-testing-approach\/#article","name":"Tips for Agile Development with Unit Testing approach. | TO THE NEW Blog","headline":"Tips for Agile Development with Unit Testing approach.","author":{"@id":"https:\/\/2thenew.online\/blog\/author\/salil\/#author"},"publisher":{"@id":"https:\/\/2thenew.online\/blog\/#organization"},"datePublished":"2010-07-14T22:52:59+05:30","dateModified":"2015-07-06T13:41:37+05:30","inLanguage":"en-US","commentCount":1,"mainEntityOfPage":{"@id":"https:\/\/2thenew.online\/blog\/tips-for-agile-development-with-unit-testing-approach\/#webpage"},"isPartOf":{"@id":"https:\/\/2thenew.online\/blog\/tips-for-agile-development-with-unit-testing-approach\/#webpage"},"articleSection":"Grails, agile, APIs, coding-practices, unit-test"},{"@type":"BreadcrumbList","@id":"https:\/\/2thenew.online\/blog\/tips-for-agile-development-with-unit-testing-approach\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/2thenew.online\/blog#listItem","position":1,"name":"Home","item":"https:\/\/2thenew.online\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/2thenew.online\/blog\/category\/grails\/#listItem","name":"Grails"}},{"@type":"ListItem","@id":"https:\/\/2thenew.online\/blog\/category\/grails\/#listItem","position":2,"name":"Grails","item":"https:\/\/2thenew.online\/blog\/category\/grails\/","nextItem":{"@type":"ListItem","@id":"https:\/\/2thenew.online\/blog\/tips-for-agile-development-with-unit-testing-approach\/#listItem","name":"Tips for Agile Development with Unit Testing approach."},"previousItem":{"@type":"ListItem","@id":"https:\/\/2thenew.online\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/2thenew.online\/blog\/tips-for-agile-development-with-unit-testing-approach\/#listItem","position":3,"name":"Tips for Agile Development with Unit Testing approach.","previousItem":{"@type":"ListItem","@id":"https:\/\/2thenew.online\/blog\/category\/grails\/#listItem","name":"Grails"}}]},{"@type":"Organization","@id":"https:\/\/2thenew.online\/blog\/#organization","name":"TO THE NEW Blog","url":"https:\/\/2thenew.online\/blog\/"},{"@type":"Person","@id":"https:\/\/2thenew.online\/blog\/author\/salil\/#author","url":"https:\/\/2thenew.online\/blog\/author\/salil\/","name":"Salil","image":{"@type":"ImageObject","@id":"https:\/\/2thenew.online\/blog\/tips-for-agile-development-with-unit-testing-approach\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/97e216cba95b296d5909ad7b93d1c338d0fdad7b95410c9412b126a90f4735d9?s=96&d=mm&r=g","width":96,"height":96,"caption":"Salil"}},{"@type":"WebPage","@id":"https:\/\/2thenew.online\/blog\/tips-for-agile-development-with-unit-testing-approach\/#webpage","url":"https:\/\/2thenew.online\/blog\/tips-for-agile-development-with-unit-testing-approach\/","name":"Tips for Agile Development with Unit Testing approach. | TO THE NEW Blog","description":"This is more towards the best practices and my experiences for developing an application at a faster rate. In my current project, we are using many different APIs (for external services). And usually it takes time to explore, implement and then stabilize the application. Also, it's not over once you stabilize your APIs based code.","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/2thenew.online\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/2thenew.online\/blog\/tips-for-agile-development-with-unit-testing-approach\/#breadcrumblist"},"author":{"@id":"https:\/\/2thenew.online\/blog\/author\/salil\/#author"},"creator":{"@id":"https:\/\/2thenew.online\/blog\/author\/salil\/#author"},"datePublished":"2010-07-14T22:52:59+05:30","dateModified":"2015-07-06T13:41:37+05:30"},{"@type":"WebSite","@id":"https:\/\/2thenew.online\/blog\/#website","url":"https:\/\/2thenew.online\/blog\/","name":"TO THE NEW Blog","inLanguage":"en-US","publisher":{"@id":"https:\/\/2thenew.online\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"TO THE NEW BLOG","og:type":"article","og:title":"Tips for Agile Development with Unit Testing approach. | TO THE NEW Blog","og:description":"This is more towards the best practices and my experiences for developing an application at a faster rate. In my current project, we are using many different APIs (for external services). And usually it takes time to explore, implement and then stabilize the application. Also, it's not over once you stabilize your APIs based code.","og:url":"https:\/\/2thenew.online\/blog\/tips-for-agile-development-with-unit-testing-approach\/","og:image":"https:\/\/2thenew.online\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","og:image:secure_url":"https:\/\/2thenew.online\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","article:tag":["grails","agile","apis","coding-practices","unit-test"],"article:published_time":"2010-07-14T17:22:59+00:00","article:modified_time":"2015-07-06T08:11:37+00:00","twitter:card":"summary","twitter:site":"@tothenew","twitter:title":"Tips for Agile Development with Unit Testing approach. | TO THE NEW Blog","twitter:description":"This is more towards the best practices and my experiences for developing an application at a faster rate. In my current project, we are using many different APIs (for external services). And usually it takes time to explore, implement and then stabilize the application. Also, it's not over once you stabilize your APIs based code.","twitter:image":"https:\/\/2thenew.online\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png"},"aioseo_meta_data":{"post_id":"1269","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":"","og_description":"","og_object_type":"article","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":"","og_article_tags":"","twitter_use_og":false,"twitter_card":"summary","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"limit_modified_date":false,"created":"2021-04-30 08:16:02","updated":"2024-02-29 11:00:22","focus_keyword":null,"additional_keywords":null,"truseo_locale":null,"ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/2thenew.online\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/2thenew.online\/blog\/category\/grails\/\" title=\"Grails\">Grails<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tTips for Agile Development with Unit Testing approach.\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/2thenew.online\/blog"},{"label":"Grails","link":"https:\/\/2thenew.online\/blog\/category\/grails\/"},{"label":"Tips for Agile Development with Unit Testing approach.","link":"https:\/\/2thenew.online\/blog\/tips-for-agile-development-with-unit-testing-approach\/"}],"_links":{"self":[{"href":"https:\/\/2thenew.online\/blog\/wp-json\/wp\/v2\/posts\/1269","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/2thenew.online\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/2thenew.online\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/2thenew.online\/blog\/wp-json\/wp\/v2\/users\/17"}],"replies":[{"embeddable":true,"href":"https:\/\/2thenew.online\/blog\/wp-json\/wp\/v2\/comments?post=1269"}],"version-history":[{"count":0,"href":"https:\/\/2thenew.online\/blog\/wp-json\/wp\/v2\/posts\/1269\/revisions"}],"wp:attachment":[{"href":"https:\/\/2thenew.online\/blog\/wp-json\/wp\/v2\/media?parent=1269"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/2thenew.online\/blog\/wp-json\/wp\/v2\/categories?post=1269"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/2thenew.online\/blog\/wp-json\/wp\/v2\/tags?post=1269"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}