Skip to main content

Continuous integration is the key!

Continuous integration (CI) is a key component of any successful software development team - not just an agile team. Doing it right will bring the following benefits to your team:

  • Provide automated builds of software for testers to pick up. 
  • A common, repeatable platform to run tests (unit, integration, automated functional and performance tests).
  • A place to run code quality tools (SonarQube, FxCop, StyleCop, JSHint etc)
  • A place to create production build installers. 
There are various great tools for setting up continuous integration and you should spend time evaluating what will be best for your project. My personal favorites are: 
It is imperative that an agile team devotes time early in their project to get their continuous integration system up and running early (sprint 1 or 2) to ensure they have a solid platform to run on. Ideally your continuous integration will run on every commit into your source control system so that the team gets immediate feedback - have the changes compiled, have the tests run, is the code quality good. In the past in teams I have configured our continuous integration system to play a siren out loud in the office if the build has broken. The public nature of a central build location ensures extra care is taken by each team member when submitting their changes. 

For continuous integration you will need the following infrastructure at a minimum:
  • A server for builds, running the tests etc. 
  • A source control system (e.g. GIT, SVN, CVS)
For larger projects you may scale this up to have multiple agents running builds and tests. 

A common mistake teams make when creating their CI system is to not share knowledge of its workings with enough team members. Ideally everyone needs to know how it works - from developers to testers. These things need maintenance now and again and you want to spread the load, and have multiple people who can pick up the task. 


Once your continuous integration environment is setup and successful, you then need to look at automatic deployment - I'll write a future blog for this. Automated or continuous deployment is the next logical extension of your CI environment where you automatically build a new version of the system for test purposes perhaps or even automatically updating your production environment depending on your project.  Again with a little up front effort, the long term benefits can be huge!

Comments

Popular posts from this blog

Managing programmers and the programming mother******* mentality

I came across the following great site on Stumbleupon today - programming-motherfucker.com - and as a developer had a great laugh before realising that in my day job I'm really the guy the site is having a swipe at!

The site aims it's gun firmly at the door of managers, whether they practice agile, XP, Scrum, waterfall etc and pokes fun at the agile manifesto:

Whilst the site may be a bit tongue in cheek (obviously taking inspiration from Pulp Fiction), a huge challenge of managing developers can be the fact they can see you as a roadblock in the way of them producing code. Ultimately you are responsible for the success or failure of a project and as a result you have probably applied a process to the team to help you ensure your team are progressing in the correct direction. So how, as a manager, can you break down this perception from members of your team who have this mentality?

Before I start, I'll confess when I started my first programming job I agree 100% with the se…

Integrating Google Analytics into existing Android app

Analytics are key to measuring the success of your project or application and are a great way of identifying your users trends and demographics. Have you released an app and wondered who your users actually are? Well with analytics you could find out where your users are situated, what ages they are etc. The leader in this field is Google Analytics - this can be embedded into your mobile application, website and even your blog.



After a few frustrating attempts at integrating Google Analytics into an existing app I thought I should post a guide on how to do this.

1. Download the Google play services library and add it to your project.

You can do this by right clicking on the project you want to add analytics to in eclipse, choosing properties and then the Android tab. In the Library section, select Add and choose google-play-services_lib and select Apply.

2. Add the required permissions to AndroidManifest.xml.

<uses-permissionandroid:name="android.permission.INTERNET"/>
<…

Android - Could not find HelloWorld.apk! - fix

So my first experience of Android development left me frustrated after getting an error trying to launch the  simple Hello World example!

Simple fix - basically when I set up eclipse I forgot to set the JAVA_HOME path variable.

The symptoms are this in the console:
[2011-12-12 22:37:05 - RoryHelloWorld] Android Launch! [2011-12-12 22:37:05 - RoryHelloWorld] adb is running normally. [2011-12-12 22:37:05 - RoryHelloWorld] Could not find RoryHelloWorld.apk!
The fix is simple. Open up your machines environment variables (in Vista it's Control Panel -> System -> Advanced System Settings -> Environment Variables).

In System Variables add a new variable JAVA_HOME set to where your JDK is installed, e.g.

JAVA_HOME=C:\Program Files\Java\jdk1.6.0_12\
Then add JAVA_HOME to your Path variable. I added:

%JAVA_HOME%\bin;%PATH%; to the end of mine
Restart eclipse for the changes to take effect, then the next time you run your app it should work!