Continuous Integration - Just another buzz word?

that Continuous Integration depends on is automated tests. Many people believe there is no way you can create enough automated tests to make a difference in the quality of the software. Even a small amount of tests can make a difference.

Automated tests can be broken down into several categories: Unit tests, smoke tests, and functional tests. Unit tests are tests typically written by developers to test individual methods, classes and/or groups of classes. Extreme Programming implements a test first approach where the developer must write an automated unit test prior to writing a line of code, then write the code to satisfy the test. Unit tests are excellent for Continuous Integration, however, there are few projects that have already established a test harness full of automated unit tests. For methodologies that are not so test-driven, focus time on automating smoke tests and functional tests.

Smoke tests are very high level tests that exercise the most basic of functionality in the application to determine application quality but with very low confidence. For example, you can start the application, log in, view a record, and close the application gracefully. Even though smoke tests may not verify quality with much confidence, this is usually an excellent place to start if your project has no tests to begin with. Take these smoke tests and integrate them into your integration build process. You may question the value of running smoke tests routinely on the latest code, but it is not uncommon for projects to go for weeks or even months without being able to create a build that can pass even a smoke test. Many times these projects don't know how far they are from having working software.

Once the smoke tests are incorporated into the integration build process, begin adding automated functional tests. When choosing what features to automate, prioritize them based on importance to the application, feature stability, and integration with other features. The highest priority features are those that are important to the application relatively stable and contain interdependencies. Having interdependencies with other features means that changes in somewhat unrelated features could affect the behavior in this feature. An automated test for this particular feature could reap benefits down the road.

The investment involved in creating these automated tests may seem high, but if you hook them up to an integration build that runs 3 times per day, each test will be run against the software at least 60 times per month. Every time they run they're helping to catch integration problems early, when they're easier to fix.

SCM Benefits of Continuous Integration

So the million dollar question is, "Is all this worth it?" Are your formal builds today non-events? Would it be worth the up-front costs to eliminate the late Friday afternoon builds that go well into the weekend because of integration problems? In the end, Continuous Integration produces higher quality software by offering developers appropriate feedback at a time when they can use it to improve the software. Along this same line, it's not uncommon to see a team go through a tedious 3-day release build process and installation into the test environment only to find out that the software release doesn't pass even the most basic smoke test. Continuous Integration catches these problems early and makes release builds much more reliable and predictable.

We can all agree that when implementing changes to software, integration issues must be addressed at some point. Addressing software integration issues at the point when the integration is developed is far less expensive and produces higher quality results than waiting until the formal release

About the author

Brad Appleton's picture
Brad Appleton

Brad Appleton is a software CM/ALM solution architect and lean/agile development champion at a large telecommunications company. Currently he helps projects and teams adopt and apply lean/agile development and CM/ALM practices and tools. He is coauthor of the bookSoftware Configuration Management Patterns, a columnist in The CM Journal and The Agile Journal at CMCrossroads.com, and a former section editor for The C++ Report. You can read Brad's blog at blog.bradapp.net.

About the author

Steve Berczuk's picture
Steve Berczuk

Steve Berczuk is an engineer and ScrumMaster at Humedica where he's helping to build next-generation SaaS-based clinical informatics applications. The author of Software Configuration Management Patterns: Effective Teamwork, Practical Integration, he is a recognized expert in software configuration management and agile software development. Steve is passionate about helping teams work effectively to produce quality software. He has an M.S. in operations research from Stanford University and an S.B. in Electrical Engineering from MIT, and is a certified, practicing ScrumMaster. Contact Steve at steve@berczuk.com or visit berczuk.com and follow his blog at blog.berczuk.com.

About the author

Steve Konieczka's picture
Steve Konieczka

Steve Konieczka is President and Chief Operating Officer of SCM Labs, a leading Software Configuration Management solutions provider. An IT consultant for fourteen years, Steve understands the challenges IT organizations face in change management. He has helped shape companies’ methodologies for creating and implementing effective SCM solutions for local and national clients. Steve is a member of Young Entrepreneurs Organization and serves on the board of the Association for Configuration and Data Management (ACDM). He holds a Bachelor of Science in Computer Information Systems from Colorado State University. You can reach Steve at steve@scmlabs.com.