SonarQube is used on a daily basis by the development teams spread out across three different sites in Europe. Quality results are displayed on wall monitors!
Kapsch TrafficCom (KTC) is a provider of intelligent transportation systems. Its systems employ information and communication technologies to support and optimize road transportation, including infrastructure, vehicles, users and industry. Its solutions in the various application fields of transportation help to reduce congestion and environmental pollution caused by road traffic, and increase traffic safety and security.
The KTC Group has subsidiaries and representative offices in 33 countries and over 3,000 employees. Software quality is important because Kapsch needs to deliver best-in-class software solutions to its customers, while at the same time following industry standards such as the automotive industry’s MISRA guidelines.
Was about to lose focus on software quality
Kapsch TrafficCom was about to lose focus on software quality due to a rapid expansion. This expansion led to the use of several new programming languages, and many new developers were hired. KTC foresaw the need to have better control, to follow coding guidelines and to ensure that the applications it developed met the defined quality goals before being released.
Also, the trend for the technical debt needed to be more visible in order to help decision makers arrive at informed decisions about refactoring vs. introducing new features. Since KTC used several different solutions for static code analysis, it was hard to put together this overview for the entire code base at once.
Bottom-up adoption of SonarQube
Then developers in the Swedish KTC office came across SonarQube. The adoption started out as a bottom-up approach that has since been embraced by management and other KTC development sites. Within the year, it will be adopted in even more locations, and used as KTC’s major solution for tracking code quality.
Key in this adoption has been the fact that SonarQube uses the same set of metrics to measure every language. KTC uses several different languages and now they can all be presented in a unified way. Current metric statuses can be seen easily, together with whether they are moving in the right direction. On top of that, the Portfolio Management (Views) plugin allows KTC to aggregate quality metrics from multi-language applications, into a unified picture of the quality of each application, and to further aggregate applications into unified presentations of product, project and department quality.
Even better, “since we analyse most of our products on a nightly basis, everyone has now access to the latest results (at every aggregation level) on demand” says Johan Esbjörner, Test Leader at KTC in Sweden.
The key features Kapsch TrafficCom uses include:
- Time Machine – to track progress on key code quality metrics.
- Views – to aggregate several languages into a product/project/department.
- Differential views – to check whether new issues have been introduced in legacy projects.
- Java API – to create its own integration plugins, as it has done for Polaroid ALM.
SonarQube results are displayed on wall monitors
SonarQube is currently being used to check code quality on more than 30 applications and 700k lines of code, and those numbers are expected to rise as adoption continues throughout the year. It’s used on a daily basis by the development teams, which are spread out across three different development sites in Europe. Esbjörner said the transition to SonarQube has been eased by the fact that “we could use our existing Jenkins infrastructure to trigger the static analysis, so there was no need for additional servers.”
Having the results easily accessible for all stakeholders via a web browser and displayed on wall monitors where people walk by has led to an increased awareness about code quality. The metrics have become an aid to visualize what needs to be done. Earlier, the developers knew that the code needed to be refactored but had a hard time getting metrics for presenting it to the decision makers. Now they can do that by just opening a web browser and showing both metrics and code. Today, quality gates are defined for all languages so that new features do not always win over refactoring. The minimum quality level is always met before a release.