-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[#354] [Compose] 2/2: Add sample UI test with Robolectric #399
[#354] [Compose] 2/2: Add sample UI test with Robolectric #399
Conversation
Kover report for template-xml:🧛 Template - XML Unit Tests Code Coverage:
|
File | Coverage |
---|---|
BaseViewModel.kt |
0.00% |
Modified Files Not Found In Coverage Report:
HomeScreen.kt
HomeScreenTest.kt
HomeScreenTest.kt
HomeScreenTest.kt
HomeViewModelTest.kt
HomeViewModelTest.kt
Versions.kt
Versions.kt
build.gradle.kts
build.gradle.kts
robolectric.properties
robolectric.properties
Codebase cunningly covered by count Shroud 🧛
Kover report for template-compose:
🧛 Template - Compose Unit Tests Code Coverage: 58.59%
Coverage of Modified Files:
File | Coverage |
---|---|
BaseViewModel.kt |
97.62% |
HomeScreen.kt |
50.46% |
Modified Files Not Found In Coverage Report:
HomeScreenTest.kt
HomeScreenTest.kt
HomeScreenTest.kt
HomeViewModelTest.kt
HomeViewModelTest.kt
Versions.kt
Versions.kt
build.gradle.kts
build.gradle.kts
robolectric.properties
robolectric.properties
Codebase cunningly covered by count Shroud 🧛
Generated by 🚫 Danger
@luongvo Everything is okay with current implementation style. There is a concern I have mentioned in this comment. There is a workaround for it but it doesn't fix the issue for |
dc95667
to
576ca89
Compare
@kaungkhantsoe I will have reply in that PR 👌 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
5f3f9c0
to
367fe6a
Compare
bce5422
to
337e96f
Compare
…Activity + HomeScreen
337e96f
to
ac96acf
Compare
sample-compose/app/src/test/java/co/nimblehq/sample/compose/ui/screens/home/HomeScreenTest.kt
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one question, the rest LGTM 🙏🏻
sample-compose/app/src/main/java/co/nimblehq/sample/compose/ui/screens/home/HomeScreen.kt
Show resolved
Hide resolved
...ompose/app/src/androidTest/java/co/nimblehq/sample/compose/ui/screens/home/HomeScreenTest.kt
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👌🏻
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
#354
What happened 👀
template
project.Insight 📝
org.robolectric:robolectric
dependency in testImplementation.androidx.compose.ui:ui-test-junit4
for Compose UI test andandroidx.test:rules
for permission granting.HomeScreenTest
fromandroidTest
folder intotest
with replacing@RunWith(AndroidJUnit4::class)
by@RunWith(RobolectricTestRunner::class)
. Now our HomeScreenTest can run with Robolectric as unit test instead of an Instrument test ✅Proof Of Work 📹
All unit tests passed ✅
Kover now can report code coverage for
HomeScreen
✅