Hi there,
We developed Android App written in Kotlin, Kotlin unit-test classes are not export to Sonarqube dashboard, but for Java unit-test classes work well and export to Sonarqube unit-test
The sonarqube plugin has not found the kotlin classes although they exists - full error message on the bottom.
Please advise what we should do? if there is any document or article kindly share it with us.
Versions:
SonarQube > Developer EditionVersion 9.0.1 (build 46107)
SonarScanner for Gradle plugin > 3.3
Sonarqube properties:
sonarqube {
properties {
property "sonar.projectName", "Android-APPPP"
property "sonar.projectKey", "com.exa.aaa"
property "sonar.sources", ["src/main/java"]
property "sonar.tests", ["src/test/java","src/test/kotlin"]
property "sonar.sourceEncoding", "UTF-8"
property "sonar.test.inclusions", "**/*Test*/**"
property "sonar.exclusions", '**/*Test*/**,' +
'build/**' +
'*.json,' +
'**/*test*/**,' +
'**/.gradle/**,' +
'**/*Generated.java,'+
'**/R.class'
property "sonar.junit.reportPaths", "${project.projectDir}/build/test-results/testDebugUnitTest"
}
}
Steps:
- ./gradlew test
- ./gradlew sonarqube
Next error messages shows
> Task :app:sonarqube
Resource not found: android.example.com.changelanguge.AppTest under the directory /Users/ahmedqamar/StudioProjects/ChangeLanguge/app while reading test reports. Please, make sure your "sonar.junit.reportPaths" property is configured properly
Resource not found: android.example.com.changelanguge.MainActivityTest under the directory /Users/ahmedqamar/StudioProjects/ChangeLanguge/app while reading test reports. Please, make sure your "sonar.junit.reportPaths" property is configured properly
Resource not found: android.example.com.changelanguge.ExampleUnitTest under the directory /Users/ahmedqamar/StudioProjects/ChangeLanguge/app while reading test reports. Please, make sure your "sonar.junit.reportPaths" property is configured properly
Sample project I try to integrate Sonarqube