SonarQube integration with Selenium Scripts

SonarQube integration with Selenium Scripts

In this blog, we are going to learn, what is SonarQube, how to integrate our selenium automation script or any other code with SonarQube for automatic Code Quality analysis and identify the different vulnerabilities.

What is SonarQube??

SonarQube is an open-source platform for continuous inspection of code quality to perform automatic reviews with static analysis of code to detect bugscode smells, and security vulnerabilities. It also offers various reports on code coverage, complexity, coding practices as well as on duplicate code. SonarQube Supports 20+ Programming languages.

Please Note before starting further on this blog, I am assuming you have basic knowledge about maven, and it is already installed in the local machine as well as in your ide along with all other maven plugins to execute the test.

How to install SonarQube??

We Can download SonarQube from the official website of Sonar under the download section or directly using the below links.

To Start SonarQube

In SonarQube installation folder under the bin, depending on your OS version there would be file name StartSonar.bat click on that file.

In the command prompt we will be getting a message stating that “SonarQube is up”.

By default SonarQube runs on http://localhost:9000

Default username and password of SonarQube is admin.

Sometime it may also ask the user to generate token this is a completely optional step and could be skip.

Now let’s check out how we can integrate Selenium or any other project with SonarQube.

1)   Inside project POM.xml file add the below two plugins i.e maven Sonar Scanner and jacoco Plugin.

2)   Now from command prompt inside project go and execute code using
     mvn clean install sonar:sonar

3)   After Successful execution of your code refresh SonarQube Dashboard and we will get report.

To know how we can read the SonarQube Report, please Click on this link.

Please refer this blog on how to integrate SonarQube with Jenkins.

Keep Learning, Keep Sharing.



My Name is Ankur Jain and I am currently working as Automation Test Architect.I am ISTQB Certified Test Manager,Certified UI Path RPA Developer as well as Certified Scrum Master with total 12 years of working experience with lot of big banking clients around the globe.I love to Design Automation Testing Frameworks with Selenium,Appium,Protractor,Cucumber,Rest-Assured, Katalon Studio and currently exploring lot in Dev-OPS as well. I am currently staying in Mumbai, Maharashtra. Please Connect with me through Contact Us page of this website.

Previous Post
Next Post
April 12, 2020 at 1:19 PM

Can elaborate a bit more about step-2

April 12, 2020 at 1:28 PM

Can you elaborate a bit more about step-2

May 1, 2020 at 5:22 PM

Nice information thank you,if you want more information please visit our link selenium online training

June 12, 2020 at 6:23 PM

Thanks for sharing steps to integrate SonarQube with Selenium. We followed the steps and we successfully got the report but our report is showing Coverage as 0.0%. Any idea what has been missed.

August 4, 2020 at 8:50 AM

The effectiveness of IEEE Project Domains depends very much on the situation in which they are applied. In order to further improve IEEE Final Year Project Domains practices we need to explicitly describe and utilise our knowledge about software domains of software engineering Final Year Project Domains for CSE technologies. This paper suggests a modelling formalism for supporting systematic reuse of software engineering technologies during planning of software projects and improvement programmes in Final Year Projects for CSE.

Software management seeks for decision support to identify technologies like JavaScript that meet best the goals and characteristics of a software project or improvement programme. JavaScript Training in Chennai Accessible experiences and repositories that effectively guide that technology selection are still lacking.

Aim of technology domain analysis is to describe the class of context situations (e.g., kinds of JavaScript software projects) in which a software engineering technology JavaScript Training in Chennai can be applied successfully

The Angular Training covers a wide range of topics including Components, Angular Directives, Angular Services, Pipes, security fundamentals, Routing, and Angular programmability. The new Angular TRaining will lay the foundation you need to specialise in Single Page Application developer. Angular Training