Blogs

How to test PHP code quality using SonarQube?

sonar-qube.png

Introduction:

We all know that the success of the project strictly depends on the quality of code. With the growth of the project and development qualification, every programmer comes to the necessity of finding a tool. A tool that helps to improve code quality and to make it stable.

There are many tools available in the market to check code quality and generate code quality reports. If you are planning to build a quality application then you must think about the code quality at the time of development.

I have tried my best to write some simple steps below for checking PHP code quality using SonarQube tool. Following steps are performed on Ubuntu 16.04 Server with root user permission:

Step 1: Create MySQL database user for SonarQube to store reports data into database

Login to MySQL root user:

mysql -u root -p

Execute following commands to create database, database user and grant permissions to database:

CREATE DATABASE <<dbname>> CHARACTER SET utf8 COLLATE utf8_general_ci;
CREATE USER '<<user>>' IDENTIFIED BY '<<pwd>>';
GRANT ALL ON <<dbname>>.* TO '<<user>>'@'%' IDENTIFIED BY '<<pwd>>';
FLUSH PRIVILEGES;

Step 2: Download & setup SonarQube

https://www.sonarqube.org/downloads/
unzip sonarqube-6.5.zip
mv sonarqube-6.5 /opt/sonar

Topics: PHP SonarQube

Integration of AWS CodeCommit, Jenkins and SonarQube

What is AWS Codecommit?

Topics: Jenkins AWS CodeCommit SonarQube

e-Zest Solutions is digital experience engineering company with facilities in the United States (Detroit & San Jose), Germany (Hannover), United Kingdom (London UK) and India (Pune) with global clientele. Our services include custom software development, offshore software development, UX consulting, BigData, Managed cloud Services (Azure & AWS), SharePoint consulting/Migration, Enterprise Java application development, Automated software testing services.