Are You Using Jenkins the Right Way?

Jenkins is a popular open source tool to perform continuous integration and build automation. The basic functionality of Jenkins is to execute a predefined list of steps, e.g. to compile Java source code and build a JAR from the resulting classes. The trigger for this execution can be time or event based. For example, every 20 minutes or after a new commit in a Git repository.

Possible steps executed by Jenkins are for example:

  • perform a software build using a build system like Apache Maven or Gradle
  • execute a shell script
  • archive a build result
  • running software tests

Jenkins is a widely used tool, but not everyone uses it in the same way. While some enjoy its test automation abilities, others take advantage of its full automating capabilities, from the code commit through the build, test and up to  deployment. These advanced users are fulfilling the complete continuous integration (CI) vision, which thoroughly facilitates and improves development processes.

How Do You Use Jenkins?

Jenkins as a Load Test Automator

Many people use Jenkins as a means to automate and simplify test launching. Instead of manually starting a bunch of scripts, prepare an environment and create an automation in Jenkins. These users don’t think of what they’re doing as part of the CI process, but rather as an easier way of running tests.

While this approach speeds the overall work of the organisation, I recommend taking advantage of all of Jenkins abilities, to make the whole development process more efficient,  improve the product’s quality and shorten the time to release.

Jenkins as Part of the CI Process

Developers who use Jenkins to trigger jobs by commits, are taking advantage of all of Jenkins capabilities. There are two ways to do this:

The “Spotless House” Approach

In this approach, performance testing is always included in the full testing process. While this might delay build time, as load tests might take a while to be completed compared to the other tests, the result is assured to be of very high quality. Think of this as cleaning your house from top to bottom every day, including sweeping, washing, doing your dishes and scrubbing windows.

The “Clean Enough” Approach

In this approach, load testing is performed as part of the downstream job, but without blocking the main CI job. The full, longer, test can be run once in a decided upon time (let’s say once a week) instead of once a day. This enables you to use Jenkins without pausing your work for too long and waiting 1.5 – 2 hours each time. Think of it as doing the dishes and sweeping the floor every day, and cleaning thoroughly once a week.


Note: This article is referred from an article by Guy Salton