mutation-analysis-plugin icon indicating copy to clipboard operation
mutation-analysis-plugin copied to clipboard

Mutation Analysis results not getting reflected in SonarQube v9.9 LTS

Open AswinVeer opened this issue 2 years ago • 5 comments

@gmuecke

Hello,

We are trying to publish the mutation analysis results in SonarQube but it not working as expected. Below is the project details,

SonarQube Version - 9.9 LTS Mutation Plugin Version - 1.7 Properties & Config Added: dc5.mutationAnalysis.pitest.sensor.reports.directory=build/reports/pitest dc5.mutationAnalysis.pitest.java.sensor.enabled=true pitest { junit5PluginVersion = '1.0.0' //or 0.15 for PIT <1.9.0 useClasspathFile = true targetClasses = ['***'] threads = (Runtime.getRuntime().availableProcessors() * 0.5).intValue() outputFormats = ['XML', 'HTML'] mutators = ['ALL'] timestampedReports = false failWhenNoMutations = false enableDefaultIncrementalAnalysis = true

}

Log Results:

16:08:17.264 DEBUG: Reading mutants 16:08:17.264 DEBUG: Searching pit reports in /workspace/source/build/reports/pitest 16:08:17.265 DEBUG: No report /workspace/source/build/reports/pitest found 16:08:17.265 DEBUG: collecting metrics 16:08:17.265 DEBUG: Enabled Languages for Pitest: [java, kotlin] 16:08:17.265 DEBUG: applying java rules 16:08:17.267 DEBUG: applying kotlin rules

Note: Mutation Analysis report is getting generated in local but the results are not getting reflected in sonar dashboard.

Please guide me in what I am missing.

Thank you!

AswinVeer avatar Aug 10 '23 14:08 AswinVeer

Hi @gmuecke @artsok @mgonzcast @psiklos

Anyone can help me on the above query please?

Thank you!

AswinVeer avatar Aug 15 '23 14:08 AswinVeer

Hi @gmuecke @artsok @mgonzcast @psiklos

Any update for me?

Thank you!

AswinVeer avatar Aug 17 '23 17:08 AswinVeer

Hi @AswinVeer!

This is a public forum so you have to be patient since it's August :)

I am not part of the development team.

I am not using 9.9 so I can't help you. Have you located the output of the pitest report? Maybe it's trying to ingest from the wrong path

mgonzcast avatar Aug 17 '23 21:08 mgonzcast

the plugin looks for the report at

16:08:17.264 DEBUG: Searching pit reports in /workspace/source/build/reports/pitest 16:08:17.265 DEBUG: No report /workspace/source/build/reports/pitest found

and doesn't find anything. Did you run pitest analysis before? (disclaimer: the plugin does not do any analysis by itself but merely processes the reports produced by pitest to upload them to SQ)

gmuecke avatar Apr 08 '24 19:04 gmuecke

Hello, this is maybe a bit late, but i tried with SonarQube V10.4 with success but i had to configure a custom quality profile extending both JAVA and Mutation Analysis profiles then activate the deprecated rule "Survived Mutants" and use the custom profile in my project in order to see the results in Sonar.

En0s0und avatar May 16 '24 09:05 En0s0und