Before I write any code I want to make sure tests are run, code is analysed for bugs and the formatting checked straightaway and every time code is changed. This means choosing a continuous integration server (or service). The choices are…

‘Jenkins CI is the leading open-source continuous integration server’ (Jenkins-ci.org, 2015). However this should not make Jenkins the default choice. TeamCity is not open source, but licenses for individuals (up to 3 build servers and 20 projects) are free.  TeamCity has the advantage of built in integration with Maven which is the build tool I am using for this project. Jenkins requires a plugin to be installed. TeamCity is also what I use at work so familiarity would be helpful.

TeamCity and Jenkins both have the same down side though. Both will require me to install them on a machine and have them running all day. Not only does this mean keeping my iMac on 24/7 it also means going through the hassle of installing it and setting up a database. Travis CI doesn’t have this problem because it’s web based. You just create an account, point it at a Github repo and it’ll run the command that makes the most sense (mvn test if you have a pom.xml) when it detects a change.

For running unit tests and running static analysis plugins like FindBugs and Checkstyle Travis CI should be fine. I may run into problems when I want to do something a little more advanced. SonarQube is the current top dog for static analysis. It highlights problem areas, measures test coverage and calculates technical debt. It provides a really nice dashboard showing all this data. SonarQube requires the CI server to be able to connect to the SonarQube instance which would be a lot easier (and more secure) if they were both located within the same network. It looks like the setup for integration tests that use Selenium web driver to fire up a browser and perform actions could be a time sink. I could definitely see a few evenings being lost there.

Due to time constraints it makes most sense to use Travis CI until a something comes up that it can’t do.