getting trouble to generate sonar test report - sonarqube

I am using sonarqube on my windows server, and it is working find from my client PCs, now I need to generation sonar test report in form of file, pdf, html or in any format to display it to my client. I tried but am not getting any solution, would you please help me, that how to export sonar test report from sonarqube server.

You're not finding that "report export" feature because SonarQube is about continually monitoring the evolution of your code, not printing out a point in time and pinning it to the wall.
If you really have to have something like this, then screenshots are the easiest way to go. Alternately, you can pull current state data using web services and build your own report.

Related

SonarQube Specific Build and Report Generation

I am currently using SonarQube Enterprise Edition - Version 8.7.
Is there an option to somehow get a specific sonar report as opposed to just "latest"?
And is it possible to have scan or SAST reports generated/exported in pdf or html format?
For audit reasons, it would be nice to get a link or report that's specific for the codebase at that snapshot in time.
Any ideas?
You can get the aggregated details of projects using:
Portfolio
Application

Sonar Qube report generation either as csv,xml or pdf

I'm using sonarqube-7.3 version. I want to make report from sonarqube either as csv, xml or pdf. I have googled it and found that we can make pdf report using sonar-pdfreport-plugin. I have dowload the version sonar-pdfreport-plugin-1.4 and pasted it in the extension/pluggin folder. But I can't restart the server. Anyone please provide a solution for getting report for the version provided above.
In general, SonarQube is not meant to be used as some reporting tool, but more as part of CI pipeline and users can use it's UI to manage code quality issues.
However, PDF reporting is available in the commercial Enterprise Edition of SonarQube for portfolios (groups of projects) as part of Governance. You can find details here https://www.sonarsource.com/plans-and-pricing/enterprise/
The plugin you are mentioning is most likely not updated for the 7.3 version

Can SonarQube be configured to show code coverage in "preview" mode reports?

I am currently working with SonarQube v5.6 and have a need to generate comprehensive "preview" reports locally before pushing the results to my remote SonarQube server. Specifically, I need to be able to see technical debt, code coverage, and duplicated blocks in the local HTML and/or console reports which are created when running the analysis in "preview" mode.
Currently, I am able to see issues -- new, existing, resolved, minor, major, etc. -- and nothing else. I would like to be able to see technical debt, code coverage, and duplicated blocks as well (at the very least, I need to see code coverage). Can SonarQube be configured to show these details in "preview" mode reports, via a command line argument or some other setting? I am using Maven and JaCoCo.
This is not supported currently (version 6.1). You can track this ticket to be informed of the progress: https://jira.sonarsource.com/browse/SONAR-6763

sonarqube incremental analysis is not working for team configuration

I've configured sonarqube server on my local machine to run and I committed the initial project with Analysis mode. Also, I created an ant target for the developers to run in incremental mode to view their new issues. I installed issuesReport on sonar server and using it from the ant file to generate html files.
However, when each developer syncs with svn and runs the ant target, they see violations by other developers under the new issues instead of only their issues.
I expected the sonarqube plugin only scan newly edited file by the developer, but is instead showing all the new files that are introduced by other developers.
To make it work properly I have to run an analysis mode from my machine. However this fixes the problem only for me, my colleagues still see all the violations as new.
How does SonarQube decide if an issue is new or not? If each developer has to run a full analysis every time, this would be big over head. Is there something am I missing?
Thanks in advance for your time and help.
An issue is considered "new" if it does not exist on the analysis server. If you run a full analysis on a CI server on a scheduled basis, it will feed the server with issues and reduce the risk of developers seeing other developer's issues in issues report in preview mode.
Please note, that the sonar documentation says, incremental mode is only for the developers and that too for the code they run against sonar prior to scm (SVN or GIT) commit.
See incremental section on the page: http://www.sonarqube.org/analysis-vs-preview-vs-incremental-preview-in-sonarqube/
The sonar report, when run with incremental mode, will show the developer, how much issue will be generated, if he commits the code. This way developer gets to know, what he can do to keep the sonar issues low. This is the whole purpose of incremental mode.
Hope this answers your question!!!

sonar qube time machine blank lines of code

Hi I configured sonarqube and triggered maven run for unit test cases.
I am able to get unit test cases success,failure details but rest all details under Time machine page are blank.
Can any one please help me on this
I think u have to independently produce coverage xml and absorb it in sonar. Major changes happened in sonar 4.3 wherein sonar folks removed the support for tools which helps in producing coverage. Please check it out!. Moreover if you find this post useful please like it.

Resources