You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue: Cannot run instrumented tests when enableAndroidTestCoverage is set to true while using coroutines 1.10.0+. I tried 1.9.0 and it works fine.
* What went wrong:
Execution failed for task ':codebase:domain:mergeExtDexDevDebugAndroidTest'.
> Could not resolve all files for configuration ':codebase:domain:devDebugAndroidTestRuntimeClasspath'.
> Failed to transform kotlinx-coroutines-debug-1.10.1.jar (org.jetbrains.kotlinx:kotlinx-coroutines-debug:1.10.1) to match attributes {artifactType=android-dex, dexing-component-attributes=ComponentSpecificParameters(minSdkVersion=24, debuggable=true, enableCoreLibraryDesugaring=true, enableGlobalSynthetics=true, enableApiModeling=false, dependenciesClassesAreInstrumented=false, asmTransformComponent=null, useJacocoTransformInstrumentation=true, enableDesugaring=true, needsClasspath=false, useFullClasspath=false, componentIfUsingFullClasspath=null), org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.jvm.environment=standard-jvm, org.gradle.jvm.version=8, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime, org.jetbrains.kotlin.platform.type=jvm}.
> Execution failed for JacocoTransform: /home/david/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/kotlinx-coroutines-debug/1.10.1/894ec9b16eb3bb3b39037afb7eb7c86e746f5844/kotlinx-coroutines-debug-1.10.1.jar.
> Unable to instrument file with Jacoco: /home/david/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/kotlinx-coroutines-debug/1.10.1/894ec9b16eb3bb3b39037afb7eb7c86e746f5844/kotlinx-coroutines-debug-1.10.1.jar
So for now I just want to check coverage while writing tests but we might need to have coverage report combined for unit tests and instrumented tests. I will try to provide some example project during the weekend (I hope), but if anyone has an idea why this happens in the meantime I would appreciate help with this. Thanks.
The text was updated successfully, but these errors were encountered:
Looks like your code coverage tool attempts to also check how well your tests cover the code in kotlinx.coroutines. It's worth a try to exclude kotlinx.coroutines code from your coverage check. I don't know how to do that, though; maybe you could ask on Stack Overflow or in Kotlin Slack. Or maybe Android or Jacoco teams could shed some light on this.
Thanks I will take a look at it tomorrow. But the weird thing is that only thing I did is to enable the coverage and I believe it uses embedded Jacoco from AGP or something like that. Also coverage for unit tests works fine. It also starts working if I downgrade coroutines library which I have no idea why. 🤔 But thanks anyway.
Issue: Cannot run instrumented tests when
enableAndroidTestCoverage
is set to true while using coroutines 1.10.0+. I tried 1.9.0 and it works fine.So for now I just want to check coverage while writing tests but we might need to have coverage report combined for unit tests and instrumented tests. I will try to provide some example project during the weekend (I hope), but if anyone has an idea why this happens in the meantime I would appreciate help with this. Thanks.
The text was updated successfully, but these errors were encountered: