> For the complete documentation index, see [llms.txt](https://n-saikiran.gitbook.io/sonarqube/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://n-saikiran.gitbook.io/sonarqube/how-to-use-sonarqube/52-advanced-analysis-using-sonarqube.md).

# 5.2 Advanced Analysis using SonarQube

If you want to validate the project then first you must navigate to the project folder in command prompt and hit the following command

> *sonar-scanner*

The above command requires the **sonar-project.properties** file to be available in the project location otherwise it gives error messages.

So, use the below basic code to create the sonar-project.properties file to compile the code and analyse it.

```
## ********************************************************************* ##
##  File Name  : sonar-project.properties                     ##  
##  Description: Used to analyse the code from scripts             ##
## ********************************************************************  ##
## Author                            Version          Creation Date     ##
## ********************************************************************  ##
##  Sai Kiran Nataraja         v1.0             20-March-2016        ##
## ********************************************************************* ##

##########################################################################
######################## Required configuration ##########################
##########################################################################

#Sonar Web Login credentials
sonar.login=saikiran.nataraja
sonar.password=saikiran

sonar.projectKey=ProjectKeyName
sonar.projectName=Selenium :: Project
sonar.projectVersion=1.0
#Sonar URL
sonar.host.url=http://localhost:9263/

#Deprecated from Sonar version 5.3
##Global database settings of sonarqube
#sonar.jdbc.username=sonar
#sonar.jdbc.password=sonar

# Language
#sonar.language=java --> To trigger multi language analysis this line is commented
sonar.java.source=1.8
sonar.java.target=1.8

# Project description
sonar.projectDescription=This project is to verify and validate the Application for every release build.

# Path to source directories (Comma-separated paths to directories with sources are required)
sonar.sources=src/
# Path to Library directories (comment if no libs)
sonar.java.libraries=Libraries/

#Path for binaries
sonar.java.binaries=bin/

##########################################################################
######################## Optional configuration ##########################
##########################################################################

# Encoding of the source files
sonar.sourceEncoding=iso-8859-1

# JUnit report generated by run-sonar.sh is stored in sonar-reports/TEST-report.xml
# The XML files have to be prefixed by TEST- otherwise they are not processed 
# For Performing Unit Tests 
#sonar.dynamicAnalysis=reuseReports
#sonar.junit.reportsPath=sonar-reports/

# Project SCM settings
sonar.scm.enabled=true
# sonar.scm.url=scm:git:https://...
```

## After we get a success message in the command prompt, we can view the analysis results in the dashboard of sonarQube.

![](https://2435610896-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M4S6_S81B3cqo6IsMQR%2F-M4S6_slCJUwbwdOoxA9%2F-M4S6lCnnUTvU-aSUoos%2FAdvancedAnalysis_1.png?generation=1586405253464199\&alt=media)

For Advanced analysis, click on the link under Bugs (i.e 320) to view which test scripts have the code issues.

![](https://2435610896-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M4S6_S81B3cqo6IsMQR%2F-M4S6_slCJUwbwdOoxA9%2F-M4S6lCpKG4BJ7Z7ARL6%2FAdvancedAnalysis_2.png?generation=1586405253414893\&alt=media)

Now select based on the file and fix the code for a greater quality product
