SonarQube Interview Question-Answer Part -1

Q.1 Which of the following is the best plugin for Java Project?

       A. Sonar way

       B. Sonar Lint

       C. Sonar Java

       D. None of the options

Ans : Sonar Java


Q.2 Search Server does an elastic search to get results from UI.

       A. True

       B. False

Ans : True


Q.3 Which among the following is the special feature of SonarQube?

       A. transparency

       B. ALM

       C. leak approach

       D. None of the options

Ans : leak approach


Q.4 Which of the following databases does SonarQube support?

       A. Microsoft SQL Server

       B. Oracle

       C. PostgreSQL

       D. All of the options

Ans : All of the options


Q.5 The default port for Sonarqube is___________.

       A. 9000

       B. 9001

       C. 8080

       D. 8081

Ans : 9000


Q.6 Sonar Scanner is the default scanner of SonarQube.

       A. True

       B. False

Ans : True


Q.7 Sonarway is the default Quality gate of SonarQube.

       A. True

       B. False

Ans : True


Q.8 SonarQube has a feature of automatic issue assignment.

       A. True

       B. False

Ans : True


Q.9 Tags differentiate between rules and issues.

       A. True

       B. False

Ans : True


Q.10 What is true about tags?

       A. Rules raises tags

       B. Tags are language specific

       C. Rules raises tags and they are language specific

       D. None of the options

Ans : Rules raises tags and they are language specific


Q.11 Which of the following statements about tags is true?

       A. Tags are case insensitive

       B. Tags are created at index time

       C. Tags can make your data more understandable

       D. Tags are searched by using the syntax tag: : <fieldneme>

Ans : Tags can make your data more understandable


Q.12 The rules which are related to bugs in a project are _________________.

       A. Security rules

       B. Reliability rules

       C. It’s an open issue

       D. None of the options

Ans : Reliability rules


Q.13 What is Quality Gate?

       A. the conditions that should be met before the project goes to production

       B. collection of rules and conditions to be met

       C. collection of rules

       D. None of the options

Ans : the conditions that should be met before the project goes to production


Q.14 When is an issue automatically closed?

       A. removed

       B. fixed

       C. when it is fixed or removed

       D. None of the options

Ans : when it is fixed or removed


Q.15 Out of 400 lines of code,124 are duplicated lines, what is the Density of Duplication?

       A. 31

       B. 75

       C. 25

       D. 46

Ans : 31


Q.16 What helps to get coverage per test?

       A. JaCaCo

       B. Cobertura

       C. Emma

       D. None of the options

Ans : JaCaCo


Q.17 An issue is raised if a piece of code breaks the rule.

       A. True

       B. False

Ans : True


Q.18 Maintainability-related issue in the code is called______________.

       A. leak period

       B. code rule

       C. code coverage

       D. code smell

Ans : code smell


Q.19 Which is true about SonarQube managing security?

       A. It manages authorization and authentication of user

       B. It does not manage customization for users

       C. It manages authorization of user

       D. It manages only authentication part

Ans : It manages authorization and authentication of user


Q.20 If the file is missing, the issue is of which resolution?

       A. unresolved

       B. closed

       C. false negative

       D. removed

Ans : removed


Q.21 Which is not part of Code Technical Review in SonarQube?

       A. Submitted

       B. Resolve

       C. confirmed

       D. Change Severity

Ans : Submitted


Q.22 What keeps a check during the leak period?

       A. Rules

       B. None of the options

       C. Quality Gate

       D. Quality Profile

Ans : Quality Gate


Q.23 Which is the not found in sonar-project.properties?

       A. sonar.projectVersion

       B. sonar.language

       C. sonar.sources

       D. sonar.code

Ans : sonar.code


Q.24 What does security covers?

       A. It enables customization for users

       B. It manages the access rights to components, pieces of information

       C. It manages the access rights to components, pieces of information and enables customization for users

       D. It covers the implementation of the policies and operational procedures that are to be maintained as security

Ans : It manages the access rights to components, pieces of information and enables customization for users


Q.25 SonarQube Scanner and Server must be located in different network.

       A. True

       B. False

Ans : True


Q.26 The header section consist of –

       A. Lines of Code
Bugs
Vulnerabilities
Code Smells

       B. Lines of Code
Bugs
coverage
Code Smells

       C. Lines
Issues
Coverage
Duplications

       D. Lines of Code
issues
Vulnerabilities
Code Smells

Ans : Lines
Issues
Coverage
Duplications


Q.27 When an issue is being encountered, the status is ____________.

       A. reopened

       B. confirmed

       C. resolved

       D. open

Ans : open


Q.28 Each Quality Gate is a combination of__________.

       A. comparison operator

       B. period

       C. measure

       D. All of the options

Ans : All of the options


Q.29 Rules that are expected to have zero or no false positive results.

       A. Reliability

       B. Maintainabilty

       C. Both reliability and maintainability

       D. None of the options

Ans : Both reliability and maintainability


Q.30 How to extend the functionality of SonarQube?

       A. Ads on

       B. Modules

       C. Extension

       D. Plugins

Ans : Plugins


Q.31 Quality Gate has ___________ types of status.

       A. four

       B. three

       C. two

       D. none of the options

Ans : three


Q.32 Which of the following are important metrics to enforce Quality Gate?

       A. Security

       B. Reliability

       C. Maintainabilty

       D. All of the options

Ans : All of the options


Q.33 What is not a search criteria for the rules in SonarQube?

       A. Language

       B. Develop

       C. Tag

       D. Type

Ans : Develop


Q.34 An issue is raised if a piece of code breaks the rule.

       A. True

       B. False

Ans : True


Q.35 SonarQube works on profiles.

       A. True

       B. False

Ans : True


Q.36 Rules are collected in ______________.

       A. Quality Gate

       B. Quality Profile

       C. Both

       D. None of the options

Ans : Quality Gate


Q.37 Which statement is correct?

       A. Sonar will run PMDtest by default for Java projects

       B. Sonar will run FindIssue by default for Java projects

       C. Sonar will run Checkmate by default for Java projects

       D. Sonar will run CheckStyle, FindBugs and PMD by default for Java projects

Ans : Sonar will run CheckStyle, FindBugs and PMD by default for Java projects


Q.38 When an resolved issue is not being corrected, what is the status it gets into automatically?

       A. reopened

       B. reconfirmed

       C. resolved

       D. None of the options

Ans : reopened


Leave a Comment

Your email address will not be published. Required fields are marked *