I’ve been tasked recently to try and get a Continuous Integration (CI) server up and running. The reason for this piece of R&D was because we had a scrum workshop and it became apparent that this could help us with our own frameworks. The interesting fact that was brought up from the workshop was; when developing software, you will spend most of the time maintaining the product after the first release. I’ve been on 3 major pieces of software in the last 2 years, each really exhaustive in the way of how much content we need to display with in very limited device setups. Every time we spend more time on maintenance than on developing the piece. When developing for devices there is even more of a watchful eye on the memory and cpu allocations, out of memory are frequent. It’s also important to note that users don’t follow the happy root that the UX people designed for, they will always find ways to “improve” it! I personally belief that software has a longer life cycle than a website and it’s this life cycle that we have to be careful for new bugs and regressions.

One possible way to help solve this would be to introduce testers, this is great, but keeping testers on the pay role constantly testing everything is very expensive. So if we as developers can help testers find an issue before testing software, they will thank-you (not forgetting your Finance guys and clients!). Testers don’t want to test buggy software because of some regression when happened to find it into your software somehow. So if we could introduce steps in between developers coding the software and releasing it to testers then I’m all for that.

This is where Unit Tests come in. Now I’m not saying you can test everything 100% (UI is extremely hard!), but what I am saying is that you should be testing the places in your code that get hit hard and often. I’m sold, it makes complete sense, those that don’t see the benefits of unit testing in software are just making mistakes for themselves to pick up later on and it will cost you massively. And it’s not just cost, it’s time and as a developer do you really want to spend the next 6 months fixing simple mistakes that you accidentally made 8 months ago.

In my eyes, unit tests help produce high quality code because it reduces the errors that hit your users – it’s that simple!

Part 2: How to setup CI