9

I have tried severally to configure this sonarqube property sonar.junit.reportPaths within Gradle but still get the same error message.
Gradle version -> 6.7.1
SonarQube Server version -> 8.9 (docker image)
Java version -> openjdk 11.0.2
Intellij version -> 2021.1.2
My Sonarqube Gradle configuration is as below:

plugins {
    id 'java'
    id 'jacoco'
    id "org.sonarqube" version "3.3"
    id 'org.jetbrains.kotlin.jvm' version '1.5.20'
}

sonarqube {
    properties {
        property 'sonar.projectName', 'Snippets of Java code'
        property 'sonar.junit.reportPaths', 'build/test-results/test'
        property 'sonar.coverage.jacoco.xmlReportPaths', 'build/reports/test/jacocoTestReport.xml'
        property 'sonar.inclusions', '*.java,*.kt'
    }
}

jacocoTestReport {
    reports {
        xml.required = true
        csv.required = false
    }
}

I still get the message below:

Resource not found: com.sammy.service.JavaFareTest under the directory /Users/samuelifere/IdeaProjects/codingChallenges while reading test reports. Please, make sure your "sonar.junit.reportPaths" property is configured properly
Resource not found: com.sammy.model.JavaCardTest under the directory /Users/samuelifere/IdeaProjects/codingChallenges while reading test reports. Please, make sure your "sonar.junit.reportPaths" property is configured properly

I read several stackoverflow pages such as these: 1, 2 but still didn't help in resolving my issue. Any help would be much appreciated, so it can properly find the resources.

The command I use to run to run this through Gradle is:

./gradlew clean build jacocoTestReport sonarqube
Sammy65
  • 627
  • 2
  • 12
  • 28

0 Answers0