arturdm / arturdm/jacoco-android-gradle-plugin
Kotlin-Tests not considered in sonarqube
- Dominant language
- Groovy
- Stars
- 565
- Forks
- 107
- PR merge metrics
- No merged PRs in 30d
Description
When i do jacoco coverage with this plugin, tests written in kotline will not recognize as unittest in sonarqube.
Here is my gradle configuration
`apply plugin: 'jacoco-android'
jacoco {
toolVersion = "0.8.3"
}
tasks.withType(Test) {
jacoco.includeNoLocationClasses = true
}
jacocoAndroidUnitTestReport {
csv.enabled false
html.enabled true
xml.enabled true
}
sonarqube {
properties {
property "sonar.projectKey", "***"
property "sonar.host.url", "***"
property "sonar.login", "***"
property "sonar.projectBaseDir", "./"
property "sonar.sources", "app/src/main/java"
property "sonar.java.source", "app/src/main/java"
property "sonar.junit.reportsPath" ,"app/build/test-results/testDebugUnitTest"
property "sonar.jacoco.reportPath", "sonar.jacoco.reportPath=app/build/jacoco/testDebugUnitTest.exec"
}
}`
Can anyone confirm that?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the Gradle configuration in the issue and inspect the generated JaCoCo and SonarQube reports for Kotlin unit tests. Done means Kotlin-written tests are recognized as unit tests by SonarQube and the resulting coverage reports remain correct.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, groovy, kotlin
- Domain
- build-system, testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100