Assigned
Status Update
Comments
ga...@linecorp.com <ga...@linecorp.com> #2
I tried adding screenshotTestImplementation(libs.androidx.window)
but it didn't fix it.
hm...@google.com <hm...@google.com>
ga...@linecorp.com <ga...@linecorp.com> #3
This is likely a duplicate of libs.androidx.window
dependency to implementation
to see if it works?
ra...@google.com <ra...@google.com>
hu...@google.com <hu...@google.com>
ho...@google.com <ho...@google.com> #4
I believe the root cause of this issue is in IntelliJ, since the built-in coverage tool is part of IntelliJ.
That being said, executing coverage on Android classes (android., libcore., etc..) is unnecessary and wasteful.
hu...@google.com <hu...@google.com> #5
+1 for excluding Android classes for coverage by default. Chris, do you know if this should be done by testCoverage DSL (by adding a new property) or by simply using jacoco plugin's DSL?
ho...@google.com <ho...@google.com> #6
FYI Android framework classes have the packages dalvik.
, libcore.
, android.
, and com.android.internal.
Description
DESCRIBE THE ISSUE IN DETAIL:
I tried to setup unittest ashttps://robolectric.org/getting-started/ Test Coverage Feature of Android Studio is not working for unittests.
Then
Currently, isIncludeAndroidResources is set true to access resources/assets.
After set to
false
, test was passed without problem.STEPS TO REPRODUCE:
1.
Open Project with Android Studio
Open
ExampleUnitTest.kt
Perform gutter
Run ExampleUnitTest with Coverage
fromATTACH SCREENSHOTS/RECORDINGS OF THE ISSUE
ATTACH LOG FILES (Select Help > Show Log in Files, or Show Log in Finder on a Mac)
IMPORTANT: Please readhttps://developer.android.com/studio/report-bugs.html carefully and supply
all required information.
Studio Build: 2023.1.1 / 2023.2.1 / 2023.3.1
Version of Gradle Plugin: 8.2.1
Version of Gradle: 8.2
Version of Java: OpenJDK 17
OS: Any