Jenkins and Continuous Testing


With 20+ projects as we have at Zemanta it's not easy to assure quality of software code. Even if developers would be diligent enough to run all tests before every push to origin, the changing environment would make some tests fail. In order to catch such changes and to keep developers honest I've been conducting monthly checks of all the projects if their unittests pass. While monthly checks are better than nothing, they are far from adequate. Furthermore, checking all projects consumed quite some of my time and even more importantly did little in improving our software development practice. To automate myself away and to further improve our development practive I've set up recently a continuous testing system using Jenkins (Kalle, thanks for pushing us in this direction) that I hope will evolve soon into a proper continuous deployment system. If I would have known how easy and fun Jenkins is, I would have set it up already a long time ago. So, if you haven't yet automated your testing I strongly recommend you do it. To help you with set up, I'm describing here how we implemented continuous testing using Jenkins at Zemanta.

We are mostly a python shop with some JavaScript code on the front and some Java in the back. While Jenkins was originally meant as a tool for building Java artifacts, it has evolved into a continuous integration system supporting many different technologies thanks to a huge (500+) number of additional plug-ins. For the case of Python the essential plug-in is the ShiningPanda plug-in that adds virtualenv build step and thus makes handling Python virtual environments much easier. If you use Django, another very helpful tool is django-jenkins which adds a special management command for transforming Python unittests into format required by Jenkins and also includes code coverage tool. The other plug-ins that I've found useful are Git plug-in, GitHub plug-in, Cobertura plug-in, and Dashboard-view plug-in.

At the moment we have four projects that are continuously tested using Jenkins. While there were some issues setting them up, I've had no problems resolving them, since Jenkins provides many useful tools for identifying sources of issues. I hope my coworkers will become as enthusiastic about Jenkins as myself and that we will soon have all 20 of our projects continuously tested.

Enhanced by Zemanta