Siemens

Contact us

Siemens

Siemens Software Factory improves code quality across 40 million lines of code by integrating SonarQube with Microsoft ALM tools and technologies.

Siemens offers unique automation portfolio from integrated drives and smart controllers to innovative PLM software from product design to production planning and setup all the way to real production and subsequent service. Siemens Software factory plays an important role in this portfolio chain as it provides PLM process for software development as well as supportive services.

SonarQube has been established as one of the Siemens global services for software code analysis and technical depth monitoring. It manages more than 40 million lines of code (LoC), with a strong bias towards Microsoft tooling (C#,C++, Microsoft Team Foundation Server (TFS), Microsoft Visual Studio) along with other technologies like TypeScript, Java, JavaScript and more. With 150+ projects in production within the company and a distributed team of 1000+ developers operating across three continents SonarQube provides integration capabilities, scalability and unified metrics to control risk and maximize reliability across its software portfolio.

Siemens Digital Factory relied on multiple code analysis tools, which was confusing for managers and developers alike.

Until 2015, Siemens Digital Factory was using multiple tools for software code quality analysis across its various business units. Project managers would use language-specific tools like FXCop (C#) and PC-Lint (C/C++) to identify and report issues with software code. Apart from these tools, they would also refer to other third-party tools to obtain information about technical debt, redundancies and potential errors.

This approach was not ideal for many reasons. Different tools produced different metrics, which made it difficult for managers to obtain a holistic view of code quality. Multiple tools also increased the learning curve for managers, requiring them to learn the details of each tool before becoming productive with them. Finally, each tool produced its own reports, resulting in multiple points of entry to any discussion of code quality.

In 2015, the Siemens Digital Factory technical management team decided to harmonize the process and adopt a common tool for software code analysis across business units and development teams. Integration with existing Microsoft tools and technologies was identified as a key requirement, as were security and scalability.

Siemens Digital Factory chose SonarQube as a main tool for code quality analysis across business units.

The project team identified a number of criteria for the tool evaluation process:

  • Support for multiple programming languages
  • Support for various C++ flavours
  • Microsoft Team Foundation Server build integration
  • IDE integration
  • Support for unit test coverage results
  • Security and scalability

Based on these criteria, the project team identified various tools which were further evaluated through real-world usage with selected development projects. Emphasis was placed on tool usability and user metrics presentation and capabilities across programming languages. System security and unit test coverage were also verified during this prototyping phase. After considering the results, the team selected SonarQube as their platform of choice.

“When we were defining the tool selection criteria, smooth integration with Microsoft technologies, multi-languages support and a unified software code quality dashboard were some of the non-negotiable items. SonarQube has met closely the defined criteria and also offered the ability to integrate our customized build tools and run code quality analysis on our legacy code.” – Siemens SonarQube Service manager.

Siemens Software products for Automation portfolio use SonarQube and its Microsoft TFS integration for both legacy and new projects.

Today, SonarQube is tightly integrated with Microsoft Team Foundation Server’s build processes for C/C++ and C# projects, as well as with unit/integration test results from Visual Studio Test Platform (VSTest.Console) and NUnit. The diagram below displays the typical build process using this integration:

TFS Build process for C# and C++

SonarQube is integrated into TFS build process using the SonarQube Scanner for MSBuild. The results are displayed in the SonarQube dashboard.

Apart from this integration, Siemens SonarQube Service has developed a unified project configuration methodology for projects using special programming languages and custom build environments. These projects are now also analyzed with SonarQube, with results appearing in SonarQube’s project dashboard.

“One of the best things about SonarQube is its powerful dashboards. These enable our project managers and developers to view available metrics in different contexts, based on their role in the development process. By unifying this data and making it visible to all concerned, SonarQube has significantly improved the quality and depth of internal discussions about code quality.” – Siemens SonarQube Service manager.

In future, Siemens SonarQube Service is planning to reimplement its SonarQube server infrastructure using virtual machines or containers.This will help to better manage workloads and make it easier for development to reach SonarQube service across the company. Siemens SonarQube Service team is working closely with the SonarSource support and product development teams providing regular feedback on various product features like SonarCFamily code analyzer and TFS implementation to continually drive its software quality policies and practices forward.


Business Benefits of SonarQube for Siemens Software Factory

  • Consistent, unified reporting
  • Smooth integration with Microsoft ALM suite
  • Large numbers of code analyzers
  • Powerful dashboards personalized to user role and context
  • Shorter learning curve due to intuitive, browser-based interface
  • Security and scalability

Siemens AG (Berlin and Munich) is a global technology powerhouse that has stood for engineering excellence, innovation, quality, reliability and internationality for 170 years. The company is active around the globe, focusing on the areas of electrification, automation and digitalization.

Read more About Siemens.



Return to Customer Stories

Company Details

Industry: Industry, Energy, Healthcare
Location: Germany