{"id":2827,"date":"2015-01-21T13:00:06","date_gmt":"2015-01-21T18:00:06","guid":{"rendered":"http:\/\/sqlity.net\/en\/?p=2827"},"modified":"2015-01-21T12:58:04","modified_gmt":"2015-01-21T17:58:04","slug":"continuous-integration","status":"publish","type":"post","link":"https:\/\/sqlity.net\/en\/2827\/continuous-integration\/","title":{"rendered":"Continuous Integration"},"content":{"rendered":"<div>\n<p>\nContinuous Integration (CI) is a development process that takes automated unit testing to the next level. It automates many of the steps required to get from a bunch of source code to a shippable product while ensuring high software quality. A CI process or CI loop runs fully automated without end-user interaction. A single execution can be started by one of two events: One is a scheduled event that kicks of the CI loop. It is recommended to have the entire CI loop run at least once a day, for example nightly. The other more commonly used way to start the CI process is a trigger that fires every time a change is committed to <a href=\"http:\/\/en.wikipedia.org\/wiki\/Revision_control\" target=\"wiki\">source control<\/a>.\n<\/p>\n<p><a href=\"http:\/\/sqlity.net\/wp-content\/uploads\/2015\/01\/CI.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/sqlity.net\/wp-content\/uploads\/2015\/01\/CI.png\" alt=\"Continuous Integration\" width=\"427\" height=\"417\" class=\"alignright size-full wp-image-2828\" srcset=\"https:\/\/sqlity.net\/wp-content\/uploads\/2015\/01\/CI.png 427w, https:\/\/sqlity.net\/wp-content\/uploads\/2015\/01\/CI-300x293.png 300w, https:\/\/sqlity.net\/wp-content\/uploads\/2015\/01\/CI-150x146.png 150w, https:\/\/sqlity.net\/wp-content\/uploads\/2015\/01\/CI-50x50.png 50w\" sizes=\"auto, (max-width: 427px) 100vw, 427px\" \/><\/a><\/p>\n<p>\nEvery time the CI loop is started, it goes through the following phases:\n<\/p>\n<ol>\n<li>Build the Software<\/li>\n<li>Compile a Deployable Package<\/li>\n<li>Deploy the Package<\/li>\n<li>Run all Automated Tests<\/li>\n<\/ol>\n<p>\nThe phases are described in more detail below.\n<\/p>\n<h3>Build the Software<\/h3>\n<p>\nBuilding the software includes steps like compiling .NET source code or collecting and combining SQL scripts. It might also include steps to create a new database and execute those SQL scripts.\n<\/p>\n<h3>Compile a Deployable Package<\/h3>\n<p>\nThe purpose of this phase is to create a complete software package that is shippable. This can for example include steps to create an installer package that can be executed on a client's machine. It also might include a step to turn the database created in the build phase into a .dacpac or similar file.\n<\/p>\n<p>\nNote, that while I am calling this package \"shippable\", it is at this point not yet confirmed to be fit for business. To confirm that, the process needs to go through two more phases.\n<\/p>\n<h3>Deploy the Package<\/h3>\n<p>\nIn this phase the package build before is deployed. This deployment is not going against a production environment nor is it going against the development environment. Instead, the deployment is happening in a dedicated environment that is duplicating production as closely as possible. This phase confirms that the package is actually deployable and does not fail half way through.\n<\/p>\n<h3>Run all Automated Tests<\/h3>\n<p>\nThis is the final and most important phase of the CI loop. In this phase, all the automated tests are executed. That includes all your unit tests, including .NET and T-SQL tests, but also other test types like integration tests and acceptance tests. If you have automated UI tests using tools like <a href=\"http:\/\/en.wikipedia.org\/wiki\/List_of_GUI_testing_tools\" target=\"wiki\">Selenium, Robot Framework or others<\/a>, they should be included too.\n<\/p>\n<p>\nSome teams even include automated performance testing in the CI process.\n<\/p>\n<h3>The Why<\/h3>\n<p>\nSo, you might ask at this point, why would I go through all this trouble?\n<\/p>\n<p>\nEvery time the CI process runs, you get either feedback about something being broken, or you get a shippable software package. While that package might not be feature complete, it is deployable and passes all the current requirements that are expressed in tests. If you are diligent about your tests, this means that you could actually ship this package to at least your alpha or beta test customers.\n<\/p>\n<p>\nBut even if you are just starting out with automated tests and have a spotty test coverage of your requirements, implementing CI has many advantages. Unit testing your code <a href=\"http:\/\/sqlity.net\/en\/1824\/5-reasons-automate-tests-t-sql-tuesday-50-automation\/\">is certainly beneficial<\/a>. However, having unit tests alone does not cover all your bases. CI complements unit testing by providing several additional benefits.\n<\/p>\n<p>\nThe main advantage of implementing a CI process probably is that the entire system is build, deployed and tested on a frequent basis giving you regularly feedback about the health of the project. I will go into more detail about this and the other advantages in a follow up article about the benefits of implementing CI. Sign up to my newsletter below, and I will notify you once that article is published.\n<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Continuous Integration (CI) is an automated process that complements your unit testing efforts. Discover how CI can create deployable software packages while giving feedback about the health of the project.<\/p>\n<p> <a href=\"https:\/\/sqlity.net\/en\/2827\/continuous-integration\/\">[more&#8230;]<\/a><\/p>\n","protected":false},"author":3,"featured_media":2828,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[254,5],"tags":[255,15,272,67],"class_list":["post-2827","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-continuous-integration","category-general","tag-continuous-integration","tag-sql-server","tag-tdd","tag-unit-test"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Continuous Integration - sqlity.net<\/title>\n<meta name=\"description\" content=\"Continuous Integration (CI) is an automated process that regularly builds deployable software packages while giving feedback about the project&#039;s health.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/sqlity.net\/en\/2827\/continuous-integration\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Continuous Integration - sqlity.net\" \/>\n<meta property=\"og:description\" content=\"Continuous Integration (CI) is an automated process that regularly builds deployable software packages while giving feedback about the project&#039;s health.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/sqlity.net\/en\/2827\/continuous-integration\/\" \/>\n<meta property=\"og:site_name\" content=\"sqlity.net\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/sqlity.net\" \/>\n<meta property=\"article:published_time\" content=\"2015-01-21T18:00:06+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/sqlity.net\/wp-content\/uploads\/2015\/01\/CI.png\" \/>\n\t<meta property=\"og:image:width\" content=\"427\" \/>\n\t<meta property=\"og:image:height\" content=\"417\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Sebastian Meine\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@sqlity\" \/>\n<meta name=\"twitter:site\" content=\"@sqlity\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Sebastian Meine\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/sqlity.net\\\/en\\\/2827\\\/continuous-integration\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/sqlity.net\\\/en\\\/2827\\\/continuous-integration\\\/\"},\"author\":{\"name\":\"Sebastian Meine\",\"@id\":\"https:\\\/\\\/sqlity.net\\\/en\\\/#\\\/schema\\\/person\\\/bcffd8c572bc2f1bd10fdba80135e53c\"},\"headline\":\"Continuous Integration\",\"datePublished\":\"2015-01-21T18:00:06+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/sqlity.net\\\/en\\\/2827\\\/continuous-integration\\\/\"},\"wordCount\":629,\"commentCount\":1,\"image\":{\"@id\":\"https:\\\/\\\/sqlity.net\\\/en\\\/2827\\\/continuous-integration\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/sqlity.net\\\/wp-content\\\/uploads\\\/2015\\\/01\\\/CI.png\",\"keywords\":[\"continuous integration\",\"SQL Server\",\"TDD\",\"unit test\"],\"articleSection\":[\"Continuous integration\",\"General\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/sqlity.net\\\/en\\\/2827\\\/continuous-integration\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/sqlity.net\\\/en\\\/2827\\\/continuous-integration\\\/\",\"url\":\"https:\\\/\\\/sqlity.net\\\/en\\\/2827\\\/continuous-integration\\\/\",\"name\":\"Continuous Integration - sqlity.net\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/sqlity.net\\\/en\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/sqlity.net\\\/en\\\/2827\\\/continuous-integration\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/sqlity.net\\\/en\\\/2827\\\/continuous-integration\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/sqlity.net\\\/wp-content\\\/uploads\\\/2015\\\/01\\\/CI.png\",\"datePublished\":\"2015-01-21T18:00:06+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/sqlity.net\\\/en\\\/#\\\/schema\\\/person\\\/bcffd8c572bc2f1bd10fdba80135e53c\"},\"description\":\"Continuous Integration (CI) is an automated process that regularly builds deployable software packages while giving feedback about the project's health.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/sqlity.net\\\/en\\\/2827\\\/continuous-integration\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/sqlity.net\\\/en\\\/2827\\\/continuous-integration\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/sqlity.net\\\/en\\\/2827\\\/continuous-integration\\\/#primaryimage\",\"url\":\"https:\\\/\\\/sqlity.net\\\/wp-content\\\/uploads\\\/2015\\\/01\\\/CI.png\",\"contentUrl\":\"https:\\\/\\\/sqlity.net\\\/wp-content\\\/uploads\\\/2015\\\/01\\\/CI.png\",\"width\":427,\"height\":417,\"caption\":\"Continuous Integration\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/sqlity.net\\\/en\\\/2827\\\/continuous-integration\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/sqlity.net\\\/en\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Continuous Integration\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/sqlity.net\\\/en\\\/#website\",\"url\":\"https:\\\/\\\/sqlity.net\\\/en\\\/\",\"name\":\"sqlity.net\",\"description\":\"Quality for SQL\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/sqlity.net\\\/en\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/sqlity.net\\\/en\\\/#\\\/schema\\\/person\\\/bcffd8c572bc2f1bd10fdba80135e53c\",\"name\":\"Sebastian Meine\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4ab0a6d02dd494849a584a2c3c8bc3bdcef1d0aa5f87e98bf905dbdb9ad2ce3a?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4ab0a6d02dd494849a584a2c3c8bc3bdcef1d0aa5f87e98bf905dbdb9ad2ce3a?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4ab0a6d02dd494849a584a2c3c8bc3bdcef1d0aa5f87e98bf905dbdb9ad2ce3a?s=96&d=mm&r=g\",\"caption\":\"Sebastian Meine\"},\"sameAs\":[\"http:\\\/\\\/sqlity.net\",\"https:\\\/\\\/x.com\\\/sqlity\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Continuous Integration - sqlity.net","description":"Continuous Integration (CI) is an automated process that regularly builds deployable software packages while giving feedback about the project's health.","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:\/\/sqlity.net\/en\/2827\/continuous-integration\/","og_locale":"en_US","og_type":"article","og_title":"Continuous Integration - sqlity.net","og_description":"Continuous Integration (CI) is an automated process that regularly builds deployable software packages while giving feedback about the project's health.","og_url":"https:\/\/sqlity.net\/en\/2827\/continuous-integration\/","og_site_name":"sqlity.net","article_publisher":"https:\/\/www.facebook.com\/sqlity.net","article_published_time":"2015-01-21T18:00:06+00:00","og_image":[{"width":427,"height":417,"url":"https:\/\/sqlity.net\/wp-content\/uploads\/2015\/01\/CI.png","type":"image\/png"}],"author":"Sebastian Meine","twitter_card":"summary_large_image","twitter_creator":"@sqlity","twitter_site":"@sqlity","twitter_misc":{"Written by":"Sebastian Meine","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/sqlity.net\/en\/2827\/continuous-integration\/#article","isPartOf":{"@id":"https:\/\/sqlity.net\/en\/2827\/continuous-integration\/"},"author":{"name":"Sebastian Meine","@id":"https:\/\/sqlity.net\/en\/#\/schema\/person\/bcffd8c572bc2f1bd10fdba80135e53c"},"headline":"Continuous Integration","datePublished":"2015-01-21T18:00:06+00:00","mainEntityOfPage":{"@id":"https:\/\/sqlity.net\/en\/2827\/continuous-integration\/"},"wordCount":629,"commentCount":1,"image":{"@id":"https:\/\/sqlity.net\/en\/2827\/continuous-integration\/#primaryimage"},"thumbnailUrl":"https:\/\/sqlity.net\/wp-content\/uploads\/2015\/01\/CI.png","keywords":["continuous integration","SQL Server","TDD","unit test"],"articleSection":["Continuous integration","General"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/sqlity.net\/en\/2827\/continuous-integration\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/sqlity.net\/en\/2827\/continuous-integration\/","url":"https:\/\/sqlity.net\/en\/2827\/continuous-integration\/","name":"Continuous Integration - sqlity.net","isPartOf":{"@id":"https:\/\/sqlity.net\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/sqlity.net\/en\/2827\/continuous-integration\/#primaryimage"},"image":{"@id":"https:\/\/sqlity.net\/en\/2827\/continuous-integration\/#primaryimage"},"thumbnailUrl":"https:\/\/sqlity.net\/wp-content\/uploads\/2015\/01\/CI.png","datePublished":"2015-01-21T18:00:06+00:00","author":{"@id":"https:\/\/sqlity.net\/en\/#\/schema\/person\/bcffd8c572bc2f1bd10fdba80135e53c"},"description":"Continuous Integration (CI) is an automated process that regularly builds deployable software packages while giving feedback about the project's health.","breadcrumb":{"@id":"https:\/\/sqlity.net\/en\/2827\/continuous-integration\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/sqlity.net\/en\/2827\/continuous-integration\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/sqlity.net\/en\/2827\/continuous-integration\/#primaryimage","url":"https:\/\/sqlity.net\/wp-content\/uploads\/2015\/01\/CI.png","contentUrl":"https:\/\/sqlity.net\/wp-content\/uploads\/2015\/01\/CI.png","width":427,"height":417,"caption":"Continuous Integration"},{"@type":"BreadcrumbList","@id":"https:\/\/sqlity.net\/en\/2827\/continuous-integration\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/sqlity.net\/en\/"},{"@type":"ListItem","position":2,"name":"Continuous Integration"}]},{"@type":"WebSite","@id":"https:\/\/sqlity.net\/en\/#website","url":"https:\/\/sqlity.net\/en\/","name":"sqlity.net","description":"Quality for SQL","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/sqlity.net\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/sqlity.net\/en\/#\/schema\/person\/bcffd8c572bc2f1bd10fdba80135e53c","name":"Sebastian Meine","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/4ab0a6d02dd494849a584a2c3c8bc3bdcef1d0aa5f87e98bf905dbdb9ad2ce3a?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/4ab0a6d02dd494849a584a2c3c8bc3bdcef1d0aa5f87e98bf905dbdb9ad2ce3a?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4ab0a6d02dd494849a584a2c3c8bc3bdcef1d0aa5f87e98bf905dbdb9ad2ce3a?s=96&d=mm&r=g","caption":"Sebastian Meine"},"sameAs":["http:\/\/sqlity.net","https:\/\/x.com\/sqlity"]}]}},"jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p2wXuw-JB","jetpack-related-posts":[],"jetpack_featured_media_url":"https:\/\/sqlity.net\/wp-content\/uploads\/2015\/01\/CI.png","_links":{"self":[{"href":"https:\/\/sqlity.net\/en\/wp-json\/wp\/v2\/posts\/2827","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sqlity.net\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sqlity.net\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sqlity.net\/en\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/sqlity.net\/en\/wp-json\/wp\/v2\/comments?post=2827"}],"version-history":[{"count":0,"href":"https:\/\/sqlity.net\/en\/wp-json\/wp\/v2\/posts\/2827\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sqlity.net\/en\/wp-json\/wp\/v2\/media\/2828"}],"wp:attachment":[{"href":"https:\/\/sqlity.net\/en\/wp-json\/wp\/v2\/media?parent=2827"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sqlity.net\/en\/wp-json\/wp\/v2\/categories?post=2827"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sqlity.net\/en\/wp-json\/wp\/v2\/tags?post=2827"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}