SonarQube is an open platform to manage code quality. As such, it covers the 7 axes of code quality:

  1. Architecture and Design
  2. Duplications
  3. Unit Tests
  4. Complexity
  5. Potential bugs
  6. Coding rules

SonarQube has got a very efficient way of navigating, a balance between high-level view, dashboard, TimeMachine and defect hunting tools. This enables to quickly uncover projects and/or components that are in Technical Debt to establish action plans.

More than 20 programming languages are covered through plugins.

Get Started in Two Minutes.

  • After download of SonarQube server, sonarqube-downloads
  • #On Windows, execute – C:\sonarqube\bin\windows-x86-xx\StartSonar.bat
    #On other operating system, execute – /etc/sonarqube/bin/[OS]/ console
    SonarQube host url = http://localhost:9000
  • Install a Database (we choose MySql on Mac OS)
    brew install mysql
    mysql.server restart (or from System Preference -> MySQL -> Start MySQL Server)
    create user ‘sonarqube’@’localhost’ identified by ‘sonarqube’;
    create database sonarqube;
    grant all privileges on sonarqube.* to ‘sonarqube’@’localhost’; (assign to user create the DB)
    use sonarqube; (check)
    show tables; (check)
  • Install SonarQube Plugin (* purchase plugins)
  • On Jenkins install the plugin for SonarQube
    sonarqube-jenkins-plugin so to set SonarQube Runner and SonarQube on Jenkins Configuration
  • In let’s set the values for the DB created to SonarQube
  • Continue in SonarQube and Gradle for Android (an example)










Happy Automatic Static Testing with SonarQube;)

share me!:))Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInEmail this to someonePrint this page