SonarQube Interview Study Plan: 3 Weeks of Labs (2027)

A 21-day SonarQube study plan with one lab and one spoken question per day: install, scan, quality gates, CI pipelines, upgrades and mock interviews.

Sep 26, 2025 - 12:39
Nov 11, 2026 - 09:42
 0  57
TOPICInterview Q & APractical guide
SonarQube Interview Study Plan: 3 Weeks of Labs (2027)

A SonarQube interview needs about three weeks of hands-on study if you are starting from basic Jenkins or Git skills. Week one covers a working server and your first scans, week two covers quality gates, new code and CI pipelines, and week three covers administration, upgrades and mock interviews. Each day has one lab and one question to answer aloud.

This is a study plan, not a question bank. When you need the questions themselves, use the 90+ SonarQube interview questions guide, the quick-answer FAQ sheet for revision, and the experienced engineer questions for week three. Facts in this plan were checked against the SonarQube Server 2026.5 documentation in November 2026.

Key takeaways

  • Do the labs. Interviewers can tell within two questions whether you have run a scan, read a failing gate and fixed it.
  • Learn one topic per day and finish with a spoken answer of about 90 seconds. Speaking exposes gaps that reading hides.
  • Week one: install, scan, read results. Week two: gates, new code, CI. Week three: operations, upgrades and mocks.
  • Keep a notebook of every error you hit and how you fixed it. Those become your best interview stories, because they are true.
  • Use the official documentation as the final check. Names and defaults change between releases.
  • If you have two weeks, merge days 3 and 4, 9 and 10, and 16 and 17, and skip the optional labs.

The plan at a glance

WeekGoalYou can say at the end
1Run SonarQube and read its results"I installed the server with a database, scanned two projects and can explain every number on the dashboard."
2Wire it into delivery"I built a pipeline that fails on the quality gate, with coverage, new code and a pull request check."
3Operate it and interview on it"I can size, secure, upgrade and troubleshoot an instance, and I have rehearsed the answers."

What you need before day 1

  • A Linux machine or virtual machine with at least 4 GB of RAM. The 2026.5 documentation gives 4 GB as the starting point for a small installation.
  • Docker and Docker Compose.
  • One small Java or Python project in a Git repository, with a few unit tests.
  • A CI system you can reach: Jenkins on your own machine, or GitHub Actions on a repository of your own.
  • For learning, use the SonarQube Community Build or a Developer edition image from Docker Hub. Check Sonar's current plans page for licensing, because editions and terms change.

Week 1: Run it and read it

Day 1: The big picture

Read what SonarQube measures: bugs, vulnerabilities, code smells, coverage and duplication, grouped as security, reliability and maintainability. Learn the three product names: SonarQube Server, SonarQube Cloud and SonarQube for IDE.

Say aloud: what problem does static analysis solve that unit tests do not? A good answer says tests prove behaviour you thought of, while rules find whole categories of mistakes you did not think of.

Day 2: Server architecture

Learn the three Java processes: Web, Compute Engine and Elasticsearch, supervised by a Sonar process, plus the database. Draw the flow from scanner to Web API to the Compute Engine queue to the database on paper.

Say aloud: why does a finished scan not always show results straight away? Because the Compute Engine processes the report afterwards, from a queue.

Day 3: Install with Docker

Set the Linux limits first, because Elasticsearch will not start without them.

sudo sysctl -w vm.max_map_count=524288
sudo sysctl -w fs.file-max=131072
ulimit -n 131072
ulimit -u 8192

Create the three volumes the documentation names, then use the Docker Compose example from the SonarQube Docker repository with PostgreSQL.

docker volume create --name sonarqube_data
docker volume create --name sonarqube_logs
docker volume create --name sonarqube_extensions

The documentation says to use volumes, not bind mounts, because bind mounts stop plugins from populating. Open port 9000 and log in.

Say aloud: why do we not run the embedded H2 database in production? It is meant for tests and trials, and it lacks replication and durability.

Day 4: First scan with the CLI

Create a project in the web interface, generate a token, add a sonar-project.properties file and scan.

sonar.projectKey=demo-app
sonar.sources=src
sonar.tests=test
export SONAR_TOKEN=<your token>
export SONAR_HOST_URL=http://localhost:9000
sonar-scanner

Read the Issues page. Open three issues and read the rule description for each.

Say aloud: what is the difference between a bug, a vulnerability and a code smell?

Day 5: Build-tool scanners

Scan once with the Maven or Gradle scanner, depending on your project.

mvn clean verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.token=$SONAR_TOKEN
# or
./gradlew build sonar --info

Say aloud: when do you use the SonarScanner CLI and when a build-tool scanner?

Day 6: Coverage

Generate a coverage report and import it. For Java with JaCoCo the property is sonar.coverage.jacoco.xmlReportPaths. For Python it is sonar.python.coverage.reportPaths. For JavaScript it is sonar.javascript.lcov.reportPaths. Break the path on purpose and watch coverage drop to zero.

Say aloud: why does SonarQube show 0 percent coverage when the tests pass? It imports a report; it does not run tests.

Day 7: Review and rest

Write one page: architecture drawing, scan commands and the coverage properties. Re-do day 4 from memory in a fresh directory.

Week 2: Gates, new code and CI

Day 8: Quality gates

Open the Sonar way gate and read its four conditions: no new issues, new Security Hotspots reviewed, at least 80.0 percent coverage on new code and at most 3.0 percent duplication on new code. It is read-only, so copy it to a custom gate and raise one threshold.

Say aloud: why does the default gate judge new code only?

Day 9: New code definitions

Test all four options on one project: Previous version, Number of days, Specific analysis and Reference branch. Change sonar.projectVersion between two scans and see the new code period move.

Say aloud: what goes wrong if the version never changes under the Previous version option?

Day 10: Quality profiles

Look at the built-in profiles per language: Sonar way core (default), extended and comprehensive. Copy one into a custom profile, deactivate one rule, activate another and assign it to the project. Re-scan and compare.

Say aloud: how would you roll out a stricter profile to 40 projects without stopping delivery?

Day 11: Jenkins pipeline

Add the SonarQube server connection to Jenkins, wrap the scan in withSonarQubeEnv, add a webhook from SonarQube to Jenkins and a gate stage.

stage('Quality Gate') {
  steps {
    timeout(time: 1, unit: 'HOURS') {
      waitForQualityGate abortPipeline: true
    }
  }
}

Make the gate fail on purpose and confirm the pipeline stops.

Say aloud: what does the webhook do, and why is the timeout block there?

Day 12: GitHub Actions or another CI

Use full Git history in the checkout (fetch-depth: 0) and pass SONAR_TOKEN and SONAR_HOST_URL from secrets and variables. Then try the scanner's own wait: -Dsonar.qualitygate.wait=true, which uses a default timeout of 300 seconds.

Say aloud: why does a shallow clone give worse results?

Day 13: Pull requests and branches

Enable branch and pull request analysis (Developer edition or above), connect your DevOps platform and open a pull request. Read the decoration. Confirm only new code conditions apply to the pull request.

Say aloud: how does a pull request gate differ from a branch gate?

Day 14: Review and rest

Rebuild the pipeline from scratch in a new repository without notes. Time yourself. If it takes more than 45 minutes, repeat days 11 or 12.

Week 3: Operate and interview

Day 15: Memory, database and hosting

Read the host requirements. Find the three heap properties: sonar.web.javaOpts, sonar.ce.javaOpts and sonar.search.javaOpts. Learn that setting one replaces its whole default value. Practise explaining the difference between a small and a large installation.

Day 16: Permissions, tokens and security

Create a group, give it permission on one project, and create a token for a CI job. Read the reverse proxy and network security pages. Write down how you would rotate a token.

Day 17: Backup and update

Read the pre-update steps. Take a database dump, restore it to a second instance and note the order of an update: release notes first, backup, update, post-update checks. Learn what an LTA is: the 2026.5 release is an LTA and 2026.1 was the previous one.

Day 18: Troubleshooting drill

Break your lab in five ways and fix each: wrong Linux limit, wrong database password, full disk, wrong coverage path, expired token. Record the log line for each.

Day 19: Security Hotspots and MQR

Read how Security Hotspots are reviewed (To review, Acknowledged, Fixed, Safe) and the note that hotspots are being phased out in favour of vulnerabilities or security issues. Read the MQR mode page, where each rule has a severity per software quality.

Day 20: Mock interview one

Ask a friend, or record yourself, answering the checkpoint questions below in order.

Day 21: Mock interview two and gap list

Answer the questions you skipped. Write a gap list and read only the documentation pages for those gaps.

Checkpoint questions with answer hints

QuestionHint for a strong answer
Why does Elasticsearch need vm.max_map_count?The documentation requires at least 524288 for the server to start; mention the other limits too.
Which process analyses the report?The Compute Engine.
What is the default port?9000, set by sonar.web.port.
What fails a quality gate?Any one failing condition.
Which conditions apply to a pull request?Only conditions on new code.
What does the fudge factor ignore?Duplication and coverage conditions below 20 new lines (or 20 new lines to cover).
How do you wait for the gate in Jenkins?withSonarQubeEnv, a webhook and waitForQualityGate.
How do you wait for it elsewhere?sonar.qualitygate.wait=true, timeout 300 seconds by default.
Where does coverage come from?A report from the test tool.
What is the maximum Number of days for new code?90, default 30.
What would you check first after a failed update?Database backup, release notes for each version, then logs.
What are the built-in profiles?Sonar way core, extended and comprehensive.

How to talk about your labs in an interview

Do not say you "have knowledge of SonarQube". Say what you built: the version you installed, the database, the pipeline stage and one failure you debugged. A short, true story such as "my coverage showed zero because the report path was relative to the wrong directory" carries more weight than a list of features. Never claim production experience you do not have. Say it was a lab, and describe what you would do differently in production.

Once the plan is done, move on to the scenario-based SonarQube questions and the real-time SonarQube questions. For the static analysis side, read the static analysis questions. To see how quality checks sit in a delivery pipeline, read 10 CI/CD quality gates.

Training

If you would rather build these labs with a trainer, our DevSecOps training and Jenkins training cover pipeline security and quality gates. Classes run in Kharadi, Pune, and live online across India.

FAQ

How long does it take to prepare for a SonarQube interview?

About three weeks at one to two hours a day if you know Git and a CI tool. With a stronger background you can compress it to two weeks by combining the lighter days.

What should I learn first for SonarQube?

Run the server with a database, scan a small project and read the results. Then learn quality gates and new code, because most questions come from those.

Do I need SonarQube experience to attend a DevOps interview?

Not always, but code quality gates are a common topic in DevSecOps roles. A short lab pipeline with a failing gate is enough to answer most entry-level questions.

Which labs matter most for interviews?

The CI pipeline that fails on the gate, the coverage import and the troubleshooting drill. These match the questions interviewers ask most.

Which edition should I practise on?

Use the Community Build or a Developer edition image for labs. Pull request analysis needs Developer edition or above, according to the editions page.

How do I answer if I only have lab experience?

Say so, then describe what you built and the problems you solved. Interviewers accept lab experience when the details are real.

Is the study plan enough to pass a SonarQube interview?

It prepares you for the practical and operational questions. Add the question guides linked on this page to rehearse wording.

Official references

Interested in learning more?Get a callback from our training advisors.

What's Your Reaction?

Like Like 0
Dislike Dislike 0
Love Love 0
Funny Funny 0
Angry Angry 0
Sad Sad 0
Wow Wow 0
Mridul I am a passionate technology enthusiast with a strong focus on DevOps, Cloud Computing, and Cybersecurity. Through my blogs at DevOps Training Institute, I aim to simplify complex concepts and share practical insights for learners and professionals. My goal is to empower readers with knowledge, hands-on tips, and industry best practices to stay ahead in the ever-evolving world of DevOps.