kiwix-android
kiwix-android copied to clipboard
Refactored test cases, added system test watcher to prevent ANR
Fixes #2928
Codecov Report
Merging #2937 (d261150) into develop (5ae578a) will decrease coverage by
10.83%. The diff coverage is0.00%.
:exclamation: Current head d261150 differs from pull request most recent head 0aeba46. Consider uploading reports for the commit 0aeba46 to get more accurate results
@@ Coverage Diff @@
## develop #2937 +/- ##
==============================================
- Coverage 44.70% 33.87% -10.84%
Complexity 25 25
==============================================
Files 299 299
Lines 9496 9498 +2
Branches 972 974 +2
==============================================
- Hits 4245 3217 -1028
- Misses 4836 5967 +1131
+ Partials 415 314 -101
| Impacted Files | Coverage Δ | |
|---|---|---|
| ...kiwix/kiwixmobile/core/utils/dialog/KiwixDialog.kt | 26.06% <0.00%> (ø) |
|
| ...va/org/kiwix/kiwixmobile/help/KiwixHelpFragment.kt | 0.00% <0.00%> (-100.00%) |
:arrow_down: |
| ...ava/org/kiwix/kiwixmobile/core/help/HelpAdapter.kt | 0.00% <0.00%> (-100.00%) |
:arrow_down: |
| ...va/org/kiwix/kiwixmobile/core/utils/UpdateUtils.kt | 0.00% <0.00%> (-100.00%) |
:arrow_down: |
| .../org/kiwix/kiwixmobile/di/modules/ServiceModule.kt | 0.00% <0.00%> (-100.00%) |
:arrow_down: |
| .../kiwix/kiwixmobile/core/search/SearchSuggestion.kt | 0.00% <0.00%> (-100.00%) |
:arrow_down: |
| ...kiwix/kiwixmobile/core/extensions/UriExtensions.kt | 0.00% <0.00%> (-100.00%) |
:arrow_down: |
| ...ix/kiwixmobile/language/adapter/LanguageAdapter.kt | 0.00% <0.00%> (-100.00%) |
:arrow_down: |
| ...x/kiwixmobile/core/page/history/HistoryFragment.kt | 0.00% <0.00%> (-100.00%) |
:arrow_down: |
| ...x/kiwixmobile/core/search/adapter/SearchAdapter.kt | 0.00% <0.00%> (-100.00%) |
:arrow_down: |
| ... and 82 more |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
hi @gouri-panda , is this PR is ready for review ?
@MohitMaliFtechiz Yes :)
hi @gouri-panda , coverage reporting is failing on both can you please take a look at it.
@MohitMaliFtechiz After #2933 i hope it will stable.
Hi @gouri-panda , Test failing reason is you forgot to paas drawer id and gravity to openDrawer() Method. https://github.com/kiwix/kiwix-android/blob/bb661551134b38de3a6ce712a2c6dfe22c42f168/app/src/androidTest/java/org/kiwix/kiwixmobile/main/TopLevelDestinationRobot.kt#L74
As you change parameters here. https://github.com/kiwix/kiwix-android/blob/bb661551134b38de3a6ce712a2c6dfe22c42f168/app/src/androidTest/java/org/kiwix/kiwixmobile/utils/StandardActions.java#L46
hi @gouri-panda ,
There were 19 test which were executed before this implementation now only 14 test are running , some of test like TopLevelDestination and other are not executing can you look at it.
@MohitMaliFtechiz Some network tests are skipping because in our CI no cellular provider there.
@MohitMaliFtechiz Some network tests are skipping because in our CI no cellular provider there.
hi @gouri-panda , All test which are extended by BaseActivityTest is not running so this might not due to network issue. Please check and if you comment
fun setUpBeforeClass() {
uiDevice = UiDevice.getInstance(getInstrumentation())
registerANRWatcher()
}
this function's all test were running , please take a look at it.
@MohitMaliFtechiz Can you please review again this PR?
hi @gouri-panda please fix the coverage reporting , i think you are still working on this please mark it as draft.
I'm closing this issue. It's better to have two PRs.