Closed julianharty closed 5 years ago
Some notes: Google provide a simple app that requests permissions at runtime https://github.com/googlesamples/android-RuntimePermissions This may be a useful testbed.
On StackOverflow there's a useful recent discussion on permissions: https://stackoverflow.com/questions/33929937/android-marshmallow-test-permissions-with-espresso/
Google recently released a utility method (in beta) to grant permissions https://developer.android.com/reference/android/support/test/rule/GrantPermissionRule.html It's still new and there are few examples of it being used. Some users on SO report problems using it. I'm hoping it'll enable us to bypass both the "screen overlay detected" (by granting permissions before the tests start) and the need to grant permissions to access the SD card.
Here's a ticket on various ways to disable animations: https://github.com/ardock/android-topeka/issues/1
Before I forget, while updating Espresso to 3.0.0 and Android Test Support Library to 1.0.0 I discovered the app failed to install/run on one of my 4 devices I've got connected.
The error included the following complaint:
android java.lang.ClassNotFoundException: com.android.dex.DexIndexOverflowException
The fix is as follows, add the notClass
argument to defaultConfig
in app/build.gradle
:
android {
defaultConfig {
testInstrumentationRunnerArguments.notClass = 'com.android.dex.DexIndexOverflowException'
}
}
See https://github.com/linkedin/dexmaker/issues/65 for the details of why.
I'd hoped that @RequiresApi(...)
would do the trick, but it seems not to work, at least not in the test runner.
Code sample that still runs on Android 4.2 & 4.3
@Test
@RequiresApi(Build.VERSION_CODES.KITKAT)
public void zimTest() {
https://developer.android.com/reference/android/support/annotation/RequiresApi.html
I've posted a Q on StackOverflow to see if anyone's got a better approach https://stackoverflow.com/questions/45865658/how-can-we-automatically-only-run-tests-on-newer-android-versions
So far I've received two suggested answers. One disappeared :( that suggested https://stackoverflow.com/questions/17654249/ignoring-android-unit-tests-depending-on-sdk-level/17654337#17654337 I implemented a version of this and it works (although the test runner in Android Studio has a shadow, second, instance of the tests. However, there a much simpler approach that uses the SdkSuppress annotation which seems to work well and doesn't need a custom test runner so I prefer to use it.
I suspect the reliability of some tests can be improved by improving/increasing our use of IdlingResource's
We currently use what's now deprecated.
See https://github.com/JakeWharton/okhttp-idling-resource for ideas on creating custom idling resources and the lates Google docs, etc. :)
It's time to revisit the challenge of coping with runtime permissions as these are preventing the tests from running cleanly on a Samsung S7 I'm using. Here are screenshots from Android Monitor
And here are the reported errors.
> Task :app:connectedKiwixDebugAndroidTest
Starting 6 tests on SM-G930F - 7.0
org.kiwix.kiwixmobile.tests.BasicTest > basicTest[SM-G930F - 7.0] FAILED
android.support.test.espresso.NoActivityResumedException: No activities in stage RESUMED. Did you forget to launch the activity. (test.getActivity() or similar)?
at dalvik.system.VMStack.getThreadStackTrace(Native Method)
org.kiwix.kiwixmobile.tests.BasicTest > testRightDrawer[SM-G930F - 7.0] FAILED
java.lang.RuntimeException: Could not launch intent Intent { act=android.intent.action.MAIN flg=0x10000000 cmp=org.kiwix.kiwixmobile/.utils.SplashActivity launchParam=MultiScreenLaunchParams { mDisplayId=0 mFlags=0 } } within 45 seconds. Perhaps the main thread has not gone idle within a reasonable amount of time? There could be an animation or something constantly repainting the screen. Or the activity is doing network calls on creation? See the threaddump logs. For your reference the last time the event queue was idle before your activity launch request was 1523004991169 and now the last time the queue went idle was: 1523005016810. If these numbers are the same your activity might be hogging the event queue.
at android.support.test.runner.MonitoringInstrumentation.startActivitySync(MonitoringInstrumentation.java:419)
org.kiwix.kiwixmobile.tests.ContentTest > contentTest[SM-G930F - 7.0] FAILED
java.lang.RuntimeException: Could not launch intent Intent { act=android.intent.action.MAIN flg=0x10000000 cmp=org.kiwix.kiwixmobile/.utils.SplashActivity launchParam=MultiScreenLaunchParams { mDisplayId=0 mFlags=0 } } within 45 seconds. Perhaps the main thread has not gone idle within a reasonable amount of time? There could be an animation or something constantly repainting the screen. Or the activity is doing network calls on creation? See the threaddump logs. For your reference the last time the event queue was idle before your activity launch request was 1523005036214 and now the last time the queue went idle was: 1523005080515. If these numbers are the same your activity might be hogging the event queue.
at android.support.test.runner.MonitoringInstrumentation.startActivitySync(MonitoringInstrumentation.java:419)
Here is another example of errors that affect the automated tests and cause them to fail:
android.support.test.espresso.PerformException: Error performing 'send keyCode: 4, metaState: 0 key event' on view '((is displayed on the screen to the user and with content description: is "More options") or (is displayed on the screen to the user and with class name: a string ending with "OverflowMenuButton"))'.
at android.support.test.espresso.PerformException$Builder.build(PerformException.java:84)
at android.support.test.espresso.base.DefaultFailureHandler.getUserFriendlyError(DefaultFailureHandler.java:81)
at android.support.test.espresso.base.DefaultFailureHandler.handle(DefaultFailureHandler.java:52)
at android.support.test.espresso.ViewInteraction.waitForAndHandleInteractionResults(ViewInteraction.java:312)
at android.support.test.espresso.ViewInteraction.desugaredPerform(ViewInteraction.java:167)
at android.support.test.espresso.ViewInteraction.perform(ViewInteraction.java:110)
at android.support.test.espresso.Espresso.openContextualActionModeOverflowMenu(Espresso.java:205)
at org.kiwix.kiwixmobile.utils.StandardActions.enterHelp(StandardActions.java:21)
at org.kiwix.kiwixmobile.tests.BasicTest.testRightDrawer(BasicTest.java:86)
...
android.support.test.espresso.InjectEventSecurityException: java.lang.SecurityException: Injecting to another application requires INJECT_EVENTS permission
On my Nexus 7 (2012) running Android 5.1.1 I disabled the 3 Animation settings and the tests then passed. With @ISNIT0 using one of my Lenovo phones adding a sleep(250)
similar to https://stackoverflow.com/questions/22163424/android-java-lang-securityexception-injecting-to-another-application-requires removed this error.
We ran a 30 device test as part of testing a recent pull request. The overall success rate was far better than we've seen recently (or even ever?) with around 99% of the tests passing. Nonetheless the tests still failed on several devices. I'll add examples of the failures as additional comments so we can investigate them more easily.
Huawei Honor 7i 22/23 passed. The failing test is testHistoryDialog
.
Here is the Error log from TestDroid:
/**
* Huawei Honor 7i
*/
//--------------------------------------------------------//
//
// 10. testHistoryDialog
//
// Stacktrace
com.schibsted.spain.barista.internal.failurehandler.BaristaException: View with string from resource id: <2131623975>[clear_all_history_dialog_title] value: Clear All History wasn't displayed on the screen
at com.schibsted.spain.barista.internal.failurehandler.SpyFailureHandler.resendFirstError(SpyFailureHandler.kt:23)
at com.schibsted.spain.barista.internal.AssertAnyKt.assertAnyView(AssertAny.kt:34)
at com.schibsted.spain.barista.internal.AssertAnyKt.assertAny(AssertAny.kt:16)
at com.schibsted.spain.barista.assertion.BaristaVisibilityAssertions.assertDisplayed(BaristaVisibilityAssertions.kt:19)
at org.kiwix.kiwixmobile.tests.SettingsTest.testHistoryDialog(SettingsTest.java:130)
at java.lang.reflect.Method.invoke(Native Method)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at android.support.test.rule.ActivityTestRule$ActivityStatement.evaluate(ActivityTestRule.java:433)
at org.junit.rules.RunRules.evaluate(RunRules.java:20)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runners.Suite.runChild(Suite.java:128)
at org.junit.runners.Suite.runChild(Suite.java:27)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at org.junit.runner.JUnitCore.run(JUnitCore.java:115)
at android.support.test.internal.runner.TestExecutor.execute(TestExecutor.java:58)
at android.support.test.runner.AndroidJUnitRunner.onStart(AndroidJUnitRunner.java:375)
at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1890)
Caused by: android.support.test.espresso.NoMatchingViewException: No views in hierarchy found matching: with string from resource id: <2131623975>[clear_all_history_dialog_title] value: Clear All History
If the target view is not part of the view hierarchy, you may need to use Espresso.onData to load it from one of the following AdapterViews:android.widget.ListView{a5647c0 VFED.VC.. .F...... 0,0-1080,1536 #102000a android:id/list}
View Hierarchy:
+>DecorView{id=-1, visibility=VISIBLE, width=1080, height=1920, has-focus=true, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=WM.LayoutParams{(0,0)(fillxfill) ty=1 fl=#85810100 hwFlags=#0 isEmuiStyle=0 statusBarColor=#0 navigationBarColor=#ff000000 wanim=0x7f0f0190 needsMenuKey=2}, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=2}
|
+->LinearLayout{id=-1, visibility=VISIBLE, width=1080, height=1776, has-focus=true, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.FrameLayout$LayoutParams@53ec788, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=2}
|
+-->ViewStub{id=16909215, res-name=action_mode_bar_stub, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@7b69521, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0}
|
+-->FrameLayout{id=-1, visibility=VISIBLE, width=1080, height=1776, has-focus=true, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@2b3bd46, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=1}
|
+--->FitWindowsFrameLayout{id=2131296269, res-name=action_bar_root, visibility=VISIBLE, width=1080, height=1776, has-focus=true, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.FrameLayout$LayoutParams@1bcd434, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=2}
|
+---->ContentFrameLayout{id=16908290, res-name=content, visibility=VISIBLE, width=1080, height=1776, has-focus=true, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.FrameLayout$LayoutParams@a46625d, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=1}
|
+----->CoordinatorLayout{id=-1, visibility=VISIBLE, width=1080, height=1776, has-focus=true, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.FrameLayout$LayoutParams@2de67d2, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=1}
|
+------>LinearLayout{id=-1, visibility=VISIBLE, width=1080, height=1704, has-focus=true, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.support.design.widget.CoordinatorLayout$LayoutParams@ac060a3, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=72.0, child-count=2}
|
+------->RelativeLayout{id=2131296509, res-name=toolbar_layout, visibility=VISIBLE, width=1080, height=168, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@26cffa0, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=1}
|
+-------->Toolbar{id=2131296508, res-name=toolbar, visibility=VISIBLE, width=1080, height=168, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.RelativeLayout$LayoutParams@40bc759, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=3}
|
+--------->AppCompatTextView{id=-1, visibility=VISIBLE, width=221, height=81, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.support.v7.widget.Toolbar$LayoutParams@7972f1e, tag=null, root-is-layout-requested=false, has-input-connection=false, x=216.0, y=43.0, text=Settings, input-type=0, ime-target=false, has-links=false}
|
+--------->AppCompatImageButton{id=-1, desc=Navigate up, visibility=VISIBLE, width=168, height=168, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=false, is-selected=false, layout-params=android.support.v7.widget.Toolbar$LayoutParams@aee63ff, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0}
|
+--------->ActionMenuView{id=-1, visibility=VISIBLE, width=0, height=168, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.support.v7.widget.Toolbar$LayoutParams@3275cc, tag=null, root-is-layout-requested=false, has-input-connection=false, x=1080.0, y=0.0, child-count=0}
|
+------->FrameLayout{id=2131296319, res-name=content_frame, visibility=VISIBLE, width=1080, height=1536, has-focus=true, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@d288015, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=168.0, child-count=1}
|
+-------->LinearLayout{id=-1, visibility=VISIBLE, width=1080, height=1536, has-focus=true, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.FrameLayout$LayoutParams@cf722b8, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=3}
|
+--------->ListView{id=16908298, res-name=list, visibility=VISIBLE, width=1080, height=1536, has-focus=true, has-focusable=true, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=true, is-focusable=true, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@41e0891, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=9}
|
+---------->LinearLayout{id=-1, visibility=VISIBLE, width=1080, height=161, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.AbsListView$LayoutParams@88c03f6, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=-54.0, child-count=3}
|
+----------->LinearLayout{id=16909185, res-name=icon_frame, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@d57b264, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=1}
|
+------------>PreferenceImageView{id=16908294, res-name=icon, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@4099ccd, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0}
|
+----------->RelativeLayout{id=-1, visibility=VISIBLE, width=796, height=161, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@7dab893, tag=null, root-is-layout-requested=false, has-input-connection=false, x=48.0, y=0.0, child-count=2}
|
+------------>AppCompatTextView{id=16908310, res-name=title, visibility=VISIBLE, width=311, height=65, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.RelativeLayout$LayoutParams@10f90d0, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=48.0, text=Zoom controls, input-type=0, ime-target=false, has-links=false}
|
+------------>AppCompatTextView{id=16908304, res-name=summary, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, layout-params=android.widget.RelativeLayout$LayoutParams@2a038c9, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, text=, input-type=0, ime-target=false, has-links=false}
|
+----------->LinearLayout{id=16908312, res-name=widget_frame, visibility=VISIBLE, width=188, height=161, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@3fb9bce, tag=null, root-is-layout-requested=false, has-input-connection=false, x=844.0, y=0.0, child-count=1}
|
+------------>Switch{id=16909196, res-name=switchWidget, visibility=VISIBLE, width=140, height=81, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@aee4aef, tag=null, root-is-layout-requested=false, has-input-connection=false, x=48.0, y=40.0, text=, input-type=0, ime-target=false, has-links=false, is-checked=true}
|
+---------->LinearLayout{id=-1, visibility=VISIBLE, width=1080, height=218, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.AbsListView$LayoutParams@624e9fc, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=110.0, child-count=3}
|
+----------->LinearLayout{id=16909185, res-name=icon_frame, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@739a6da, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=1}
|
+------------>PreferenceImageView{id=16908294, res-name=icon, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@afea70b, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0}
|
+----------->RelativeLayout{id=-1, visibility=VISIBLE, width=984, height=218, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@2d4a9e8, tag=null, root-is-layout-requested=false, has-input-connection=false, x=48.0, y=0.0, child-count=2}
|
+------------>AppCompatTextView{id=16908310, res-name=title, visibility=VISIBLE, width=234, height=65, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.RelativeLayout$LayoutParams@1c13801, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=48.0, text=Zoom level, input-type=0, ime-target=false, has-links=false}
|
+------------>AppCompatTextView{id=16908304, res-name=summary, visibility=VISIBLE, width=153, height=57, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.RelativeLayout$LayoutParams@1b56a6, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=113.0, text=medium, input-type=0, ime-target=false, has-links=false}
|
+----------->LinearLayout{id=16908312, res-name=widget_frame, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@a6ea8e7, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=0}
|
+---------->AppCompatTextView{id=16908310, res-name=title, visibility=VISIBLE, width=1080, height=105, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.AbsListView$LayoutParams@23e7c94, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=331.0, text=History, input-type=0, ime-target=false, has-links=false}
|
+---------->LinearLayout{id=-1, visibility=VISIBLE, width=1080, height=218, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.AbsListView$LayoutParams@d08533d, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=439.0, child-count=3}
|
+----------->LinearLayout{id=16909185, res-name=icon_frame, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@4f2ec83, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=1}
|
+------------>PreferenceImageView{id=16908294, res-name=icon, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@fd0ce00, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0}
|
+----------->RelativeLayout{id=-1, visibility=VISIBLE, width=984, height=218, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@eabe639, tag=null, root-is-layout-requested=false, has-input-connection=false, x=48.0, y=0.0, child-count=2}
|
+------------>AppCompatTextView{id=16908310, res-name=title, visibility=VISIBLE, width=267, height=65, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.RelativeLayout$LayoutParams@86c947e, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=48.0, text=Clear history, input-type=0, ime-target=false, has-links=false}
|
+------------>AppCompatTextView{id=16908304, res-name=summary, visibility=VISIBLE, width=713, height=57, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.RelativeLayout$LayoutParams@2edcddf, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=113.0, text=Clear recent searches and tabs history, input-type=0, ime-target=false, has-links=false}
|
+----------->LinearLayout{id=16908312, res-name=widget_frame, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@d74ca2c, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=0}
|
+---------->AppCompatTextView{id=16908310, res-name=title, visibility=VISIBLE, width=1080, height=105, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.AbsListView$LayoutParams@a5bacf5, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=660.0, text=Language, input-type=0, ime-target=false, has-links=false}
|
+---------->LinearLayout{id=-1, visibility=VISIBLE, width=1080, height=218, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.AbsListView$LayoutParams@2397a8a, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=768.0, child-count=3}
|
+----------->LinearLayout{id=16909185, res-name=icon_frame, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@7a5d18, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=1}
|
+------------>PreferenceImageView{id=16908294, res-name=icon, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@5072371, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0}
|
+----------->RelativeLayout{id=-1, visibility=VISIBLE, width=984, height=218, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@b3cb556, tag=null, root-is-layout-requested=false, has-input-connection=false, x=48.0, y=0.0, child-count=2}
|
+------------>AppCompatTextView{id=16908310, res-name=title, visibility=VISIBLE, width=155, height=65, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.RelativeLayout$LayoutParams@e9d99d7, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=48.0, text=English, input-type=0, ime-target=false, has-links=false}
|
+------------>AppCompatTextView{id=16908304, res-name=summary, visibility=VISIBLE, width=357, height=57, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.RelativeLayout$LayoutParams@14432c4, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=113.0, text=Choose a language, input-type=0, ime-target=false, has-links=false}
|
+----------->LinearLayout{id=16908312, res-name=widget_frame, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@91985ad, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=0}
|
+---------->AppCompatTextView{id=16908310, res-name=title, visibility=VISIBLE, width=1080, height=105, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.AbsListView$LayoutParams@766d0e2, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=989.0, text=Information, input-type=0, ime-target=false, has-links=false}
|
+---------->LinearLayout{id=-1, visibility=VISIBLE, width=1080, height=218, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.AbsListView$LayoutParams@b37fc73, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=1097.0, child-count=3}
|
+----------->LinearLayout{id=16909185, res-name=icon_frame, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@275cfa9, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=1}
|
+------------>PreferenceImageView{id=16908294, res-name=icon, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@725192e, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0}
|
+----------->RelativeLayout{id=-1, visibility=VISIBLE, width=984, height=218, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@beccf, tag=null, root-is-layout-requested=false, has-input-connection=false, x=48.0, y=0.0, child-count=2}
|
+------------>AppCompatTextView{id=16908310, res-name=title, visibility=VISIBLE, width=161, height=65, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.RelativeLayout$LayoutParams@e55165c, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=48.0, text=Version, input-type=0, ime-target=false, has-links=false}
|
+------------>AppCompatTextView{id=16908304, res-name=summary, visibility=VISIBLE, width=230, height=57, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.RelativeLayout$LayoutParams@e32bd65, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=113.0, text=2.3 Build: 55, input-type=0, ime-target=false, has-links=false}
|
+----------->LinearLayout{id=16908312, res-name=widget_frame, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@26d9a3a, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=0}
|
+---------->LinearLayout{id=-1, visibility=VISIBLE, width=1080, height=218, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.AbsListView$LayoutParams@8486eb, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=1318.0, child-count=3}
|
+----------->LinearLayout{id=16909185, res-name=icon_frame, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@a16cae1, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=1}
|
+------------>PreferenceImageView{id=16908294, res-name=icon, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@88b2006, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0}
|
+----------->RelativeLayout{id=-1, visibility=VISIBLE, width=984, height=218, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@1a2a6c7, tag=null, root-is-layout-requested=false, has-input-connection=false, x=48.0, y=0.0, child-count=2}
|
+------------>AppCompatTextView{id=16908310, res-name=title, visibility=VISIBLE, width=152, height=65, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.RelativeLayout$LayoutParams@5fbd4f4, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=48.0, text=Credits, input-type=0, ime-target=false, has-links=false}
|
+------------>AppCompatTextView{id=16908304, res-name=summary, visibility=VISIBLE, width=489, height=57, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.RelativeLayout$LayoutParams@fd4341d, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=113.0, text=Contributors and Licenses, input-type=0, ime-target=false, has-links=false}
|
+----------->LinearLayout{id=16908312, res-name=widget_frame, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@a93692, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=0}
|
+--------->AppCompatTextView{id=16908292, res-name=empty, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@d98e863, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, text=, input-type=0, ime-target=false, has-links=false}
|
+--------->RelativeLayout{id=16909192, res-name=button_bar, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@72029de, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=2}
|
+---------->AppCompatButton{id=16909193, res-name=back_button, visibility=VISIBLE, width=0, height=0, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=true, is-selected=false, layout-params=android.widget.RelativeLayout$LayoutParams@527a7bf, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, text=Back, input-type=0, ime-target=false, has-links=false}
|
+---------->LinearLayout{id=-1, visibility=VISIBLE, width=0, height=0, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, layout-params=android.widget.RelativeLayout$LayoutParams@38105ea, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=2}
|
+----------->AppCompatButton{id=16909194, res-name=skip_button, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=true, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@ab900db, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, text=Skip, input-type=0, ime-target=false, has-links=false}
|
+----------->AppCompatButton{id=16909195, res-name=next_button, visibility=VISIBLE, width=0, height=0, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=true, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@36a4778, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, text=Next, input-type=0, ime-target=false, has-links=false}
|
+---->ViewStubCompat{id=2131296282, res-name=action_mode_bar_stub, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, layout-params=android.widget.FrameLayout$LayoutParams@4d72e51, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0}
|
+->View{id=16908336, res-name=navigationBarBackground, visibility=VISIBLE, width=1080, height=144, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.FrameLayout$LayoutParams@36196b6, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=1776.0}
|
at android.support.test.espresso.NoMatchingViewException$Builder.build(NoMatchingViewException.java:142)
at android.support.test.espresso.base.ViewFinderImpl.getView(ViewFinderImpl.java:105)
at android.support.test.espresso.ViewInteraction$2.call(ViewInteraction.java:266)
at android.support.test.espresso.ViewInteraction$2.call(ViewInteraction.java:258)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.Handler.handleCallback(Handler.java:743)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:150)
at android.app.ActivityThread.main(ActivityThread.java:5621)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:794)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:684)
// Error message
View with string from resource id: <2131623975>[clear_all_history_dialog_title] value: Clear All History wasn't displayed on the screen
I'll attach the video recording if I can get it downloaded from TestDroid.
Samsung Galaxy Ace
PROCESSING_RESULTS: Installing application application.apk failed with error message Failure [INSTALL_FAILED_ALREADY_EXISTS]
And the error log proudly declares:
/**
* Samsung Galaxy A3 SM-A300FU
*/
I don't know why it'd already have the app installed on this device or why it wasn't automatically cleaned.
No errors :)
Failed tests:
testHistoryDialog
testToggle
Assumption: the device lost connectivity and displayed a lock screen that obscured the test runner from 'seeing' and/or interacting with the app.
From watching the screen recording, the WiFi disconnected at 1:52 according to a Toast message.
Then a lock screen appeared from 1:55 to 2:28. Kiwix was then visible on screen again.
At 2:34 another Toast message stated the device was connected to the WiFi network again. (I've blanked out the name of the WiFi network from the screenshot)
/**
* Samsung Galaxy Note 5 SM N920R4
*/
//--------------------------------------------------------//
//
// 10. testHistoryDialog
//
// Stacktrace
android.support.test.espresso.NoActivityResumedException: No activities in stage RESUMED. Did you forget to launch the activity. (test.getActivity() or similar)?
at dalvik.system.VMStack.getThreadStackTrace(Native Method)
at java.lang.Thread.getStackTrace(Thread.java:580)
at android.support.test.espresso.base.DefaultFailureHandler.getUserFriendlyError(DefaultFailureHandler.java:90)
at android.support.test.espresso.base.DefaultFailureHandler.handle(DefaultFailureHandler.java:52)
at android.support.test.espresso.ViewInteraction.waitForAndHandleInteractionResults(ViewInteraction.java:312)
at android.support.test.espresso.ViewInteraction.desugaredPerform(ViewInteraction.java:167)
at android.support.test.espresso.ViewInteraction.perform(ViewInteraction.java:110)
at android.support.test.espresso.DataInteraction$DisplayDataMatcher$1.apply(DataInteraction.java:206)
at android.support.test.espresso.DataInteraction$DisplayDataMatcher$1.apply(DataInteraction.java:203)
at android.support.test.espresso.DataInteraction$DisplayDataMatcher.<init>(DataInteraction.java:223)
at android.support.test.espresso.DataInteraction$DisplayDataMatcher.<init>(DataInteraction.java:198)
at android.support.test.espresso.DataInteraction$DisplayDataMatcher.displayDataMatcher(DataInteraction.java:241)
at android.support.test.espresso.DataInteraction.makeTargetMatcher(DataInteraction.java:143)
at android.support.test.espresso.DataInteraction.perform(DataInteraction.java:128)
at org.kiwix.kiwixmobile.tests.SettingsTest.testHistoryDialog(SettingsTest.java:128)
at java.lang.reflect.Method.invoke(Native Method)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at android.support.test.rule.ActivityTestRule$ActivityStatement.evaluate(ActivityTestRule.java:433)
at org.junit.rules.RunRules.evaluate(RunRules.java:20)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runners.Suite.runChild(Suite.java:128)
at org.junit.runners.Suite.runChild(Suite.java:27)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at org.junit.runner.JUnitCore.run(JUnitCore.java:115)
at android.support.test.internal.runner.TestExecutor.execute(TestExecutor.java:58)
at android.support.test.runner.AndroidJUnitRunner.onStart(AndroidJUnitRunner.java:375)
at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1959)
// Error message
No activities in stage RESUMED. Did you forget to launch the activity. (test.getActivity() or similar)?
//--------------------------------------------------------//
//
// 11. testToggle
//
// Stacktrace
java.lang.RuntimeException: Could not launch intent Intent { act=android.intent.action.MAIN flg=0x10000000 cmp=org.kiwix.kiwixmobile/.utils.SplashActivity } within 45 seconds. Perhaps the main thread has not gone idle within a reasonable amount of time? There could be an animation or something constantly repainting the screen. Or the activity is doing network calls on creation? See the threaddump logs. For your reference the last time the event queue was idle before your activity launch request was 1523877262075 and now the last time the queue went idle was: 1523877307007. If these numbers are the same your activity might be hogging the event queue.
at android.support.test.runner.MonitoringInstrumentation.startActivitySync(MonitoringInstrumentation.java:419)
at android.support.test.rule.ActivityTestRule.launchActivity(ActivityTestRule.java:332)
at android.support.test.rule.ActivityTestRule$ActivityStatement.evaluate(ActivityTestRule.java:431)
at org.junit.rules.RunRules.evaluate(RunRules.java:20)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runners.Suite.runChild(Suite.java:128)
at org.junit.runners.Suite.runChild(Suite.java:27)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at org.junit.runner.JUnitCore.run(JUnitCore.java:115)
at android.support.test.internal.runner.TestExecutor.execute(TestExecutor.java:58)
at android.support.test.runner.AndroidJUnitRunner.onStart(AndroidJUnitRunner.java:375)
at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1959)
// Error message
Could not launch intent Intent { act=android.intent.action.MAIN flg=0x10000000 cmp=org.kiwix.kiwixmobile/.utils.SplashActivity } within 45 seconds. Perhaps the main thread has not gone idle within a reasonable amount of time? There could be an animation or something constantly repainting the screen. Or the activity is doing network calls on creation? See the threaddump logs. For your reference the last time the event queue was idle before your activity launch request was 1523877262075 and now the last time the queue went idle was: 1523877307007. If these numbers are the same your activity might be hogging the event queue.
Failing test: networkTest
This test seemed to fail because the WiFi on the device reconnected several times while this test was running. The download was very slow and didn't complete in the allotted time. Here's an example of the Toast message appearing, again I've blanked out the WiFi name. I didn't see any disconnect Toasts (unlike on the previous device's test run).
/**
* Samsung Galaxy Note Edge SM-N915FY
*/
//--------------------------------------------------------//
//
// 6. networkTest
//
// Stacktrace
android.support.test.espresso.PerformException: Error performing 'single click - At Coordinates: 765, 818 and precision: 16, 16' on view ' displaying data matching: with content 'wikipedia_ab_all_2017-03' within adapter view matching: with id: org.kiwix.kiwixmobile:id/library_list'.
at android.support.test.espresso.PerformException$Builder.build(PerformException.java:84)
at android.support.test.espresso.base.DefaultFailureHandler.getUserFriendlyError(DefaultFailureHandler.java:81)
at android.support.test.espresso.base.DefaultFailureHandler.handle(DefaultFailureHandler.java:52)
at android.support.test.espresso.ViewInteraction.waitForAndHandleInteractionResults(ViewInteraction.java:312)
at android.support.test.espresso.ViewInteraction.desugaredPerform(ViewInteraction.java:167)
at android.support.test.espresso.ViewInteraction.perform(ViewInteraction.java:110)
at android.support.test.espresso.DataInteraction.perform(DataInteraction.java:128)
at org.kiwix.kiwixmobile.tests.NetworkTest.networkTest(NetworkTest.java:140)
at java.lang.reflect.Method.invoke(Native Method)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at android.support.test.internal.runner.junit4.statement.RunBefores.evaluate(RunBefores.java:80)
at android.support.test.internal.runner.junit4.statement.RunAfters.evaluate(RunAfters.java:61)
at android.support.test.rule.ActivityTestRule$ActivityStatement.evaluate(ActivityTestRule.java:433)
at android.support.test.rule.GrantPermissionRule$RequestPermissionStatement.evaluate(GrantPermissionRule.java:109)
at android.support.test.rule.GrantPermissionRule$RequestPermissionStatement.evaluate(GrantPermissionRule.java:109)
at org.junit.rules.RunRules.evaluate(RunRules.java:20)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runners.Suite.runChild(Suite.java:128)
at org.junit.runners.Suite.runChild(Suite.java:27)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at org.junit.runner.JUnitCore.run(JUnitCore.java:115)
at android.support.test.internal.runner.TestExecutor.execute(TestExecutor.java:58)
at android.support.test.runner.AndroidJUnitRunner.onStart(AndroidJUnitRunner.java:375)
at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1959)
Caused by: android.support.test.espresso.IdlingResourceTimeoutException: Wait for [Standard Kiwix Idling Resource] to become idle timed out
at android.support.test.espresso.IdlingPolicy.handleTimeout(IdlingPolicy.java:60)
at android.support.test.espresso.base.UiControllerImpl$4.resourcesHaveTimedOut(UiControllerImpl.java:368)
at android.support.test.espresso.base.IdlingResourceRegistry$Dispatcher.handleTimeout(IdlingResourceRegistry.java:467)
at android.support.test.espresso.base.IdlingResourceRegistry$Dispatcher.handleMessage(IdlingResourceRegistry.java:400)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.support.test.espresso.base.Interrogator.loopAndInterrogate(Interrogator.java:160)
at android.support.test.espresso.base.UiControllerImpl.loopUntil(UiControllerImpl.java:472)
at android.support.test.espresso.base.UiControllerImpl.loopMainThreadUntilIdle(UiControllerImpl.java:381)
at android.support.test.espresso.base.UiControllerImpl.loopMainThreadForAtLeast(UiControllerImpl.java:405)
at android.support.test.espresso.action.Tap$1.sendTap(Tap.java:49)
at android.support.test.espresso.action.GeneralClickAction.perform(GeneralClickAction.java:128)
at android.support.test.espresso.ViewInteraction$SingleExecutionViewAction.perform(ViewInteraction.java:356)
at android.support.test.espresso.ViewInteraction.doPerform(ViewInteraction.java:241)
at android.support.test.espresso.ViewInteraction.access$100(ViewInteraction.java:62)
at android.support.test.espresso.ViewInteraction$1.call(ViewInteraction.java:149)
at android.support.test.espresso.ViewInteraction$1.call(ViewInteraction.java:146)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:158)
at android.app.ActivityThread.main(ActivityThread.java:7225)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
// Error message
Error performing 'single click - At Coordinates: 765, 818 and precision: 16, 16' on view ' displaying data matching: with content 'wikipedia_ab_all_2017-03' within adapter view matching: with id: org.kiwix.kiwixmobile:id/library_list'.
testToggle
A screenlock was displayed at 40, 48 - 53, 59 - 1:02 and numerous additional times during the test run. Similarly there was a Toast message at 1:24 and again at 2:22 stating the device had connected to the WiFi.
/**
* Samsung Galaxy S5 Neo SM-G903F
*/
//--------------------------------------------------------//
//
// 11. testToggle
//
// Stacktrace
android.support.test.espresso.NoActivityResumedException: No activities in stage RESUMED. Did you forget to launch the activity. (test.getActivity() or similar)?
at dalvik.system.VMStack.getThreadStackTrace(Native Method)
at java.lang.Thread.getStackTrace(Thread.java:580)
at android.support.test.espresso.base.DefaultFailureHandler.getUserFriendlyError(DefaultFailureHandler.java:90)
at android.support.test.espresso.base.DefaultFailureHandler.handle(DefaultFailureHandler.java:52)
at android.support.test.espresso.ViewInteraction.waitForAndHandleInteractionResults(ViewInteraction.java:312)
at android.support.test.espresso.ViewInteraction.desugaredPerform(ViewInteraction.java:167)
at android.support.test.espresso.ViewInteraction.perform(ViewInteraction.java:110)
at android.support.test.espresso.DataInteraction$DisplayDataMatcher$1.apply(DataInteraction.java:206)
at android.support.test.espresso.DataInteraction$DisplayDataMatcher$1.apply(DataInteraction.java:203)
at android.support.test.espresso.DataInteraction$DisplayDataMatcher.<init>(DataInteraction.java:223)
at android.support.test.espresso.DataInteraction$DisplayDataMatcher.<init>(DataInteraction.java:198)
at android.support.test.espresso.DataInteraction$DisplayDataMatcher.displayDataMatcher(DataInteraction.java:241)
at android.support.test.espresso.DataInteraction.makeTargetMatcher(DataInteraction.java:143)
at android.support.test.espresso.DataInteraction.perform(DataInteraction.java:128)
at org.kiwix.kiwixmobile.tests.SettingsTest.testToggle(SettingsTest.java:46)
at java.lang.reflect.Method.invoke(Native Method)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at android.support.test.rule.ActivityTestRule$ActivityStatement.evaluate(ActivityTestRule.java:433)
at org.junit.rules.RunRules.evaluate(RunRules.java:20)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runners.Suite.runChild(Suite.java:128)
at org.junit.runners.Suite.runChild(Suite.java:27)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at org.junit.runner.JUnitCore.run(JUnitCore.java:115)
at android.support.test.internal.runner.TestExecutor.execute(TestExecutor.java:58)
at android.support.test.runner.AndroidJUnitRunner.onStart(AndroidJUnitRunner.java:375)
at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1960)
// Error message
No activities in stage RESUMED. Did you forget to launch the activity. (test.getActivity() or similar)?
networkTest
BTW: The device was running in Landscape view according to the screen recording.
My assessment is that more tests should have failed as the device didn't seem able to reach the kiwix download server. However the downloadTest
didn't fail, the networkTest
did.
Here is a zipped copy of the screen recording. screen-recording-GalaxyTabS10.5.zip
/**
* Samsung Galaxy Tab S 10.5 SM-T800
*/
//--------------------------------------------------------//
//
// 6. networkTest
//
// Stacktrace
android.support.test.espresso.PerformException: Error performing 'load adapter data' on view 'with id: org.kiwix.kiwixmobile:id/library_list'.
at android.support.test.espresso.PerformException$Builder.build(PerformException.java:84)
at android.support.test.espresso.base.DefaultFailureHandler.getUserFriendlyError(DefaultFailureHandler.java:81)
at android.support.test.espresso.base.DefaultFailureHandler.handle(DefaultFailureHandler.java:52)
at android.support.test.espresso.ViewInteraction.waitForAndHandleInteractionResults(ViewInteraction.java:312)
at android.support.test.espresso.ViewInteraction.desugaredPerform(ViewInteraction.java:167)
at android.support.test.espresso.ViewInteraction.perform(ViewInteraction.java:110)
at android.support.test.espresso.DataInteraction$DisplayDataMatcher$1.apply(DataInteraction.java:206)
at android.support.test.espresso.DataInteraction$DisplayDataMatcher$1.apply(DataInteraction.java:203)
at android.support.test.espresso.DataInteraction$DisplayDataMatcher.<init>(DataInteraction.java:223)
at android.support.test.espresso.DataInteraction$DisplayDataMatcher.<init>(DataInteraction.java:198)
at android.support.test.espresso.DataInteraction$DisplayDataMatcher.displayDataMatcher(DataInteraction.java:241)
at android.support.test.espresso.DataInteraction.makeTargetMatcher(DataInteraction.java:143)
at android.support.test.espresso.DataInteraction.perform(DataInteraction.java:128)
at org.kiwix.kiwixmobile.tests.NetworkTest.networkTest(NetworkTest.java:140)
at java.lang.reflect.Method.invoke(Native Method)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at android.support.test.internal.runner.junit4.statement.RunBefores.evaluate(RunBefores.java:80)
at android.support.test.internal.runner.junit4.statement.RunAfters.evaluate(RunAfters.java:61)
at android.support.test.rule.ActivityTestRule$ActivityStatement.evaluate(ActivityTestRule.java:433)
at android.support.test.rule.GrantPermissionRule$RequestPermissionStatement.evaluate(GrantPermissionRule.java:109)
at android.support.test.rule.GrantPermissionRule$RequestPermissionStatement.evaluate(GrantPermissionRule.java:109)
at org.junit.rules.RunRules.evaluate(RunRules.java:20)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runners.Suite.runChild(Suite.java:128)
at org.junit.runners.Suite.runChild(Suite.java:27)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at org.junit.runner.JUnitCore.run(JUnitCore.java:115)
at android.support.test.internal.runner.TestExecutor.execute(TestExecutor.java:58)
at android.support.test.runner.AndroidJUnitRunner.onStart(AndroidJUnitRunner.java:375)
at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1960)
Caused by: java.lang.RuntimeException: No data found matching: with content 'wikipedia_ab_all_2017-03' contained values: <[]>
at android.support.test.espresso.action.AdapterDataLoaderAction.perform(AdapterDataLoaderAction.java:94)
at android.support.test.espresso.ViewInteraction$SingleExecutionViewAction.perform(ViewInteraction.java:356)
at android.support.test.espresso.ViewInteraction.doPerform(ViewInteraction.java:241)
at android.support.test.espresso.ViewInteraction.access$100(ViewInteraction.java:62)
at android.support.test.espresso.ViewInteraction$1.call(ViewInteraction.java:149)
at android.support.test.espresso.ViewInteraction$1.call(ViewInteraction.java:146)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:7331)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
// Error message
Error performing 'load adapter data' on view 'with id: org.kiwix.kiwixmobile:id/library_list'.
Here's an extract from the device's log for the downloadTest
which seemed to pass. However watching the screen-recording indicates that none of the network interactions with the kiwix download server actually worked. The test (in the pull request) doesn't actually check the app downloaded the file successfully.
04-16 13:14:01.501 14983 14983 I ViewInteraction: Performing 'load adapter data' action on view with id: org.kiwix.kiwixmobile:id/zimfilelist
04-16 13:14:01.506 14983 15035 I TEST_DELETE_ZIM: Failed to delete ZIM file [ray_charles]... Probably because it doesn't exist
04-16 13:14:01.506 14983 14983 I ViewInteraction: Performing 'single click' action on view (is displayed on the screen to the user and with string from resource id: <2131624132>[remote_zims] value: Online)
04-16 13:14:01.511 2957 4020 D InputDispatcher: Inject motion (14983): action=0x0, eventTime=231803736000000
04-16 13:14:01.511 2957 3289 I InputDispatcher: Delivering touch to (3410): action: 0x4, toolType: 0
04-16 13:14:01.511 2957 3289 I InputDispatcher: Delivering touch to (14983): action: 0x0, toolType: 0
04-16 13:14:01.511 14983 14983 D ViewRootImpl: ViewPostImeInputStage processPointer 0
04-16 13:14:01.551 2957 3665 D InputDispatcher: Inject motion (14983): action=0x1, eventTime=231803776000000
04-16 13:14:01.551 2957 3289 I InputDispatcher: Delivering touch to (14983): action: 0x1, toolType: 1
04-16 13:14:01.551 14983 14983 D ViewRootImpl: ViewPostImeInputStage processPointer 1
04-16 13:14:01.556 2516 2826 I APM::AudioPolicyManager: stopOutput() output 2, stream 1, session 110
04-16 13:14:01.561 2957 3755 V AudioService: AudioService playSoundEffect Type : 0, volume : -1.0
04-16 13:14:01.561 2957 3360 V AudioService: received MSG_PLAY_SOUND_EFFECT onPlaySoundEffect start
04-16 13:14:01.561 2516 2516 I APM::AudioPolicyManager: getSituationVolume: isBTConnected:0 isHeadConnected:0
04-16 13:14:01.571 14983 14983 D TextView: setTypeface with style : 0
04-16 13:14:01.581 2516 2857 W AudioPolicyIntefaceImpl: Skipped to add effects on session 111
04-16 13:14:01.581 2516 2857 I APM::AudioPolicyManager: startOutput() output 2, stream 1, session 111
04-16 13:14:01.581 14983 14983 D TextView: setTypeface with style : 0
04-16 13:14:01.586 2516 2852 I AudioHardwareTinyALSA: AudioStreamOutALSA::setParameters() routing=2, outputtype:0
04-16 13:14:01.586 2516 2852 I AudioHardwareTinyALSA: mParent->isFactoryRouteEnable()=0
04-16 13:14:01.586 2516 2852 I AudioHardwareTinyALSA: mLoopbackDevice=0
04-16 13:14:01.586 2516 2852 D TinyUCM : setModifier CodecRxMute, en=1
04-16 13:14:01.586 2516 2852 E TinyUCM : Failed to get AIF2 digital mute
04-16 13:14:01.586 2516 2852 D AudioHardwareTinyALSA: OutALSA::setDevice: mode = 0, newDevice=0x2, currentDevice=0x2 ,force= 0
04-16 13:14:01.586 2516 2852 D AudioHardwareTinyALSA: OutALSA::setDevice: mDevice 0x2, newDevice = 0x2
04-16 13:14:01.586 2516 2852 D AudioHardwareTinyALSA: setOutputVolume
04-16 13:14:01.586 2516 2852 D TinyUCM : setModifier Normal, en=1
04-16 13:14:01.586 2516 2852 D AudioHardwareTinyALSA: setPcmInterface: Stream=0x1, iSamplerate=8000++
04-16 13:14:01.586 2516 2852 D AudioHardwareTinyALSA: setPcmInterface--
04-16 13:14:01.586 2516 2852 D TinyUCM : setModifier CodecRxMute, en=0
04-16 13:14:01.586 2516 2852 E TinyUCM : Failed to get AIF2 digital mute
04-16 13:14:01.586 2516 2852 D AudioFlinger: setCurDevice() 0x2
04-16 13:14:01.626 2516 2852 D AudioFlinger: mixer(0xb0880000) throttle end: throttle time(1)
04-16 13:14:01.851 14983 14983 I ViewInteraction: Performing 'scroll to' action on view with id: org.kiwix.kiwixmobile:id/network_permission_button
04-16 13:14:01.856 2516 2826 I APM::AudioPolicyManager: stopOutput() output 2, stream 1, session 111
04-16 13:14:01.886 14983 15035 D kiwixDownloadTest: Failed to click Network Permission Button
04-16 13:14:01.886 14983 15035 D kiwixDownloadTest: com.schibsted.spain.barista.internal.failurehandler.BaristaException: Could not click on view with id: org.kiwix.kiwixmobile:id/network_permission_button
04-16 13:14:01.886 14983 15035 D kiwixDownloadTest: at com.schibsted.spain.barista.internal.failurehandler.SpyFailureHandler.resendFirstError(SpyFailureHandler.kt:23)
04-16 13:14:01.886 14983 15035 D kiwixDownloadTest: at com.schibsted.spain.barista.interaction.BaristaClickInteractions.performClickTypeOnMatcher(BaristaClickInteractions.kt:67)
04-16 13:14:01.886 14983 15035 D kiwixDownloadTest: at com.schibsted.spain.barista.interaction.BaristaClickInteractions.clickOn(BaristaClickInteractions.kt:36)
04-16 13:14:01.886 14983 15035 D kiwixDownloadTest: at org.kiwix.kiwixmobile.tests.DownloadTest.downloadTest(DownloadTest.java:101)
04-16 13:14:01.886 14983 15035 D kiwixDownloadTest: at java.lang.reflect.Method.invoke(Native Method)
04-16 13:14:01.886 14983 15035 D kiwixDownloadTest: at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
04-16 13:14:01.886 14983 15035 D kiwixDownloadTest: at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
04-16 13:14:01.886 14983 15035 D kiwixDownloadTest: at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
04-16 13:14:01.886 14983 15035 D kiwixDownloadTest: at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
04-16 13:14:01.886 14983 15035 D kiwixDownloadTest: at android.support.test.internal.runner.junit4.statement.RunBefores.evaluate(RunBefores.java:80)
04-16 13:14:01.886 14983 15035 D kiwixDownloadTest: at android.support.test.internal.runner.junit4.statement.RunAfters.evaluate(RunAfters.java:61)
04-16 13:14:01.886 14983 15035 D kiwixDownloadTest: at android.support.test.rule.ActivityTestRule$ActivityStatement.evaluate(ActivityTestRule.java:433)
04-16 13:14:01.886 14983 15035 D kiwixDownloadTest: at android.support.test.rule.GrantPermissionRule$RequestPermissionStatement.evaluate(GrantPermissionRule.java:109)
04-16 13:14:01.886 14983 15035 D kiwixDownloadTest: at android.support.test.rule.GrantPermissionRule$RequestPermissionStatement.evaluate(GrantPermissionRule.java:109)
04-16 13:14:01.886 14983 15035 D kiwixDownloadTest: at org.junit.rules.RunRules.evaluate(RunRules.java:20)
04-16 13:14:01.886 14983 15035 D kiwixDownloadTest: at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
04-16 13:14:01.886 14983 15035 D kiwixDownloadTest: at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
04-16 13:14:01.886 14983 15035 D kiwixDownloadTest: at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
04-16 13:14:01.886 14983 15035 D kiwixDownloadTest: at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
04-16 13:14:01.886 14983 15035 D kiwixDownloadTest: at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
04-16 13:14:01.886 14983 15035 D kiwixDownloadTest: at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
04-16 13:14:01.886 14983 15035 D kiwixDownloadTest: at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
04-16 13:14:01.886 14983 15035 D kiwixDownloadTest: at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
04-16 13:14:01.886 14983 15035 D kiwixDownloadTest: at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
04-16 13:14:01.886 14983 15035 D kiwixDownloadTest: at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
04-16 13:14:01.886 14983 15035 D kiwixDownloadTest: at org.junit.runners.Suite.runChild(Suite.java:128)
04-16 13:14:01.886 14983 15035 D kiwixDownloadTest: at org.junit.runners.Suite.runChild(Suite.java:27)
04-16 13:14:01.886 14983 15035 D kiwixDownloadTest: at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
04-16 13:14:01.886 14983 15035 D kiwixDownloadTest: at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
04-16 13:14:01.886 14983 15035 D kiwixDownloadTest: at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
04-16 13:14:01.886 14983 15035 D kiwixDownloadTest: at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
04-16 13:14:01.886 14983 15035 D kiwixDownloadTest: at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
04-16 13:14:01.886 14983 15035 D kiwixDownloadTest: at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
04-16 13:14:01.886 14983 15035 D kiwixDownloadTest: at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
04-16 13:14:01.886 14983 15035 D kiwixDownloadTest: at org.junit.runner.JUnitCore.run(JUnitCore.java:115)
04-16 13:14:01.886 14983 15035 D kiwixDownloadTest: at android.support.test.internal.runner.TestExecutor.execute(TestExecutor.java:58)
04-16 13:14:01.886 14983 15035 D kiwixDownloadTest: at android.support.test.runner.AndroidJUnitRunner.onStart(AndroidJUnitRunner.java:375)
04-16 13:14:01.886 14983 15035 D kiwixDownloadTest: at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1960)
04-16 13:14:01.886 14983 15035 D kiwixDownloadTest: Caused by: android.support.test.espresso.NoMatchingViewException: No views in hierarchy found matching: (is displayed on the screen to the user and with id: org.kiwix.kiwixmobile:id/network_permission_button)
04-16 13:14:01.886 14983 15035 D kiwixDownloadTest: If the target view is not part of the view hierarchy, you may need to use Espresso.onData to load it from one of the following AdapterViews:android.widget.ListView{8f1395a V.ED.VC.. ......ID 0,0-2560,0 #7f090110 app:id/zim_downloader_list}
04-16 13:14:01.886 14983 15035 D kiwixDownloadTest: - android.widget.ListView{104987c V.ED.VCL. ........ 0,0-2560,1440 #7f090113 app:id/zimfilelist}
04-16 13:14:01.886 14983 15035 D kiwixDownloadTest: - android.widget.ListView{42d8913 V.ED.VC.. ........ 0,0-2560,1440 #7f090088 app:id/library_list}
04-16 13:14:01.886 14983 15035 D kiwixDownloadTest:
04-16 13:14:01.886 14983 15035 D kiwixDownloadTest: View Hierarchy:
04-16 13:14:01.886 14983 15035 D kiwixDownloadTest: +>DecorView{id=-1, visibility=VISIBLE, width=2560, height=1600, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusa
04-16 13:14:01.896 2498 3294 D PermissionCache: checking android.permission.READ_FRAME_BUFFER for uid=2000 => granted (250 us)
04-16 13:14:02.706 2957 3384 D lights : button : 0 +
04-16 13:14:02.721 15904 15904 I FIPS_bssl: FIPS approved mode (1) | 15904 | app_process
04-16 13:14:02.736 15904 15904 D AndroidRuntime: >>>>>> START com.android.internal.os.RuntimeInit uid 2000 <<<<<<
04-16 13:14:02.741 15904 15904 D AndroidRuntime: CheckJNI is OFF
04-16 13:14:02.741 15904 15904 D AndroidRuntime: readGMSProperty: start
04-16 13:14:02.741 15904 15904 D AndroidRuntime: readGMSProperty: already setted!!
04-16 13:14:02.741 15904 15904 D AndroidRuntime: propertySet: couldn't set property (it is from app)
04-16 13:14:02.741 15904 15904 D AndroidRuntime: readGMSProperty: could not set the property(default)!!
04-16 13:14:02.741 15904 15904 D AndroidRuntime: readGMSProperty: end
04-16 13:14:02.741 15904 15904 D AndroidRuntime: addProductProperty: start
04-16 13:14:02.766 2957 3384 D lights : button : 0 -
04-16 13:14:02.766 2957 3384 D LightsService: Excessive delay setting light: 55ms
04-16 13:14:02.811 15904 15904 D ICU : No timezone override file found: /data/misc/zoneinfo/current/icu/icu_tzdata.dat
04-16 13:14:02.866 5134 5134 I art : Starting a blocking GC Explicit
04-16 13:14:02.881 5134 5134 I art : Explicit concurrent mark sweep GC freed 33(1376B) AllocSpace objects, 0(0B) LOS objects, 39% free, 10MB/17MB, paused 319us total 14.726ms
04-16 13:14:02.891 15904 15904 I Radio-JNI: register_android_hardware_Radio DONE
04-16 13:14:02.906 15904 15904 E AffinityControl: AffinityControl: registerfunction enter
04-16 13:14:02.931 15904 15904 D AndroidRuntime: Calling main entry com.android.commands.settings.SettingsCmd
04-16 13:14:02.941 15904 15904 D AndroidRuntime: Shutting down VM
04-16 13:14:02.986 3745 15856 E WakeLock: release without a matched acquire!
04-16 13:14:02.986 2957 14525 D NetworkMonitor/NetworkAgentInfo [WIFI () - 2960]: ValidatedState{ when=0 what=532488 arg1=10023 target=com.android.internal.util.StateMachine$SmHandler }
04-16 13:14:02.986 2957 14525 D NetworkMonitor/NetworkAgentInfo [WIFI () - 2960]: DefaultState{ when=0 what=532488 arg1=10023 target=com.android.internal.util.StateMachine$SmHandler }
04-16 13:14:02.986 2957 14525 D NetworkMonitor/NetworkAgentInfo [WIFI () - 2960]: Forcing reevaluation for UID 10023
04-16 13:14:02.986 2957 14525 D NetworkMonitor/NetworkAgentInfo [WIFI () - 2960]: EvaluatingState{ when=0 what=532486 arg1=6 target=com.android.internal.util.StateMachine$SmHandler }
04-16 13:14:02.986 2510 3253 D Netd : getNetworkForDns: using netid 2960 for uid 1000
04-16 13:14:02.986 2957 3733 D ConnectivityService: reportNetworkConnectivity(2960, false) by 10023
04-16 13:14:02.986 2957 3914 V AlarmManager: remove PendingIntent] PendingIntent{d5987d9: PendingIntentRecord{73d857 com.google.android.gms broadcastIntent}}
04-16 13:14:02.991 2957 14525 D NetworkMonitor/NetworkAgentInfo [WIFI () - 2960]: Checking http://connectivitycheck.gstatic.com/generate_204 on "TDMZ", connectivitycheck.gstatic.com=216.58.215.99
04-16 13:14:02.991 2957 14525 I System.out: (HTTPLog)-Static: isSBSettingEnabled false
04-16 13:14:02.991 2957 14525 I System.out: (HTTPLog)-Static: isSBSettingEnabled false
04-16 13:14:02.991 2957 14525 I qtaguid : Tagging socket 326 with tag ffffffff00000000{4294967295,0} uid 10023, pid: 2957, getuid(): 1000
04-16 13:14:02.996 2957 14525 I qtaguid : Untagging socket 326
04-16 13:14:02.996 2957 14525 D NetworkMonitor/NetworkAgentInfo [WIFI () - 2960]: Probably not a portal: exception java.net.ConnectException: failed to connect to connectivitycheck.gstatic.com/216.58.215.99 (port 80) after 10000ms: connect failed: ENOBUFS (No buffer space available)
04-16 13:14:02.996 2957 14525 D NetworkMonitor/NetworkAgentInfo [WIFI () - 2960]: Validated
04-16 13:14:02.996 2957 3345 D WifiNetworkAgent: NetworkAgent: CMD_REPORT_NETWORK_STATUS(VALID)
04-16 13:14:02.996 2957 3345 D WifiNetworkAgent: NetworkAgent: CMD_REPORT_NETWORK_STATUS(1)
04-16 13:14:02.996 2957 3353 D ConnectivityService: NetworkAgentInfo [WIFI () - 2960] validation passed
04-16 13:14:03.441 3410 3410 D StatusBar.NetworkController: refreshViews connected={ wifi } level=?? combinedSignalIconId=0x7f0205cc/com.android.systemui:drawable/stat_sys_wifi_signal_4 mobileLabel= wifiLabel="TDMZ" emergencyOnly=false combinedLabel="TDMZ" mAirplaneMode=false mDataActivity=0 mPhoneSignalIconId=0x0/(null) mQSPhoneSignalIconId=0x0/(null) mDataDirectionIconId=0x0/(null) mDataSignalIconId=0x0/(null) mDataTypeIconId=0x0/(null) mQSDataTypeIconId=0x0/(null) mNoSimIconId=0x0/(null) mWifiIconId=0x7f0205cc/com.android.systemui:drawable/stat_sys_wifi_signal_4 mQSWifiIconId=0x7f0202aa/com.android.systemui:drawable/qs_tile_wifi_signal_4 mWifiActivityIconId=0x7f020574/com.android.systemui:drawable/stat_sys_signal_in mBluetoothTetherIconId=0x7f0205a1/com.android.systemui:drawable/stat_sys_tether_bluetooth
04-16 13:14:03.441 3410 3410 D StatusBar.NetworkController: refreshNwBoosterIndicator - setNWBoosterIndicators(false)
-- cut --
04-16 13:14:03.461 14983 14983 I ViewInteraction: Performing 'Wait for at least 250 millis' action on view is a root view.
04-16 13:14:03.551 14983 15037 I art : Starting a blocking GC Explicit
04-16 13:14:03.586 14983 15037 I art : Explicit concurrent mark sweep GC freed 414(31KB) AllocSpace objects, 0(0B) LOS objects, 40% free, 20MB/34MB, paused 786us total 38.548ms
04-16 13:14:03.691 14983 15037 D LeakCanary: Could not dump heap, previous analysis still is in progress.
04-16 13:14:03.711 14983 14983 I ViewInteraction: Performing 'load adapter data' action on view with id: org.kiwix.kiwixmobile:id/library_list
04-16 13:14:03.716 14983 15035 I TEST_DELETE_ZIM: Failed to delete ZIM file [ray_charles]... Probably because it doesn't exist
For the networkTest
here's what seems the relevant part of the device's log:
04-16 13:14:16.471 14983 14983 I ViewInteraction: Performing 'load adapter data' action on view with id: org.kiwix.kiwixmobile:id/library_list
04-16 13:14:16.481 14983 14983 D LifecycleMonitor: Lifecycle status change: org.kiwix.kiwixmobile.KiwixMobileActivity@486a2b8 in: DESTROYED
04-16 13:14:16.481 16014 16014 D SamsungTTS: onDestroy()
04-16 13:14:16.481 16014 16039 W ContextImpl: Calling a method in the system process without a qualified user: android.app.ContextImpl.sendBroadcast:843 android.content.ContextWrapper.sendBroadcast:410 android.speech.tts.TextToSpeechService$SynthThread.broadcastTtsQueueProcessingCompleted:460 android.speech.tts.TextToSpeechService$SynthThread.queueIdle:452 android.os.MessageQueue.next:392
04-16 13:14:16.491 14983 14983 D ViewRootImpl: #3 mView = null
04-16 13:14:16.496 14983 15035 I TestRunner: failed: networkTest(org.kiwix.kiwixmobile.tests.NetworkTest)
04-16 13:14:16.496 14983 15035 I TestRunner: ----- begin exception -----
04-16 13:14:16.501 14983 15035 I TestRunner: android.support.test.espresso.PerformException: Error performing 'load adapter data' on view 'with id: org.kiwix.kiwixmobile:id/library_list'.
04-16 13:14:16.501 14983 15035 I TestRunner: at android.support.test.espresso.PerformException$Builder.build(PerformException.java:84)
04-16 13:14:16.501 14983 15035 I TestRunner: at android.support.test.espresso.base.DefaultFailureHandler.getUserFriendlyError(DefaultFailureHandler.java:81)
04-16 13:14:16.501 14983 15035 I TestRunner: at android.support.test.espresso.base.DefaultFailureHandler.handle(DefaultFailureHandler.java:52)
04-16 13:14:16.501 14983 15035 I TestRunner: at android.support.test.espresso.ViewInteraction.waitForAndHandleInteractionResults(ViewInteraction.java:312)
04-16 13:14:16.501 14983 15035 I TestRunner: at android.support.test.espresso.ViewInteraction.desugaredPerform(ViewInteraction.java:167)
04-16 13:14:16.501 14983 15035 I TestRunner: at android.support.test.espresso.ViewInteraction.perform(ViewInteraction.java:110)
04-16 13:14:16.501 14983 15035 I TestRunner: at android.support.test.espresso.DataInteraction$DisplayDataMatcher$1.apply(DataInteraction.java:206)
04-16 13:14:16.501 14983 15035 I TestRunner: at android.support.test.espresso.DataInteraction$DisplayDataMatcher$1.apply(DataInteraction.java:203)
04-16 13:14:16.501 14983 15035 I TestRunner: at android.support.test.espresso.DataInteraction$DisplayDataMatcher.<init>(DataInteraction.java:223)
04-16 13:14:16.501 14983 15035 I TestRunner: at android.support.test.espresso.DataInteraction$DisplayDataMatcher.<init>(DataInteraction.java:198)
04-16 13:14:16.501 14983 15035 I TestRunner: at android.support.test.espresso.DataInteraction$DisplayDataMatcher.displayDataMatcher(DataInteraction.java:241)
04-16 13:14:16.501 14983 15035 I TestRunner: at android.support.test.espresso.DataInteraction.makeTargetMatcher(DataInteraction.java:143)
04-16 13:14:16.501 14983 15035 I TestRunner: at android.support.test.espresso.DataInteraction.perform(DataInteraction.java:128)
04-16 13:14:16.501 14983 15035 I TestRunner: at org.kiwix.kiwixmobile.tests.NetworkTest.networkTest(NetworkTest.java:140)
04-16 13:14:16.501 14983 15035 I TestRunner: at java.lang.reflect.Method.invoke(Native Method)
04-16 13:14:16.501 14983 15035 I TestRunner: at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
04-16 13:14:16.501 14983 15035 I TestRunner: at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
04-16 13:14:16.501 14983 15035 I TestRunner: at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
04-16 13:14:16.501 14983 15035 I TestRunner: at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
04-16 13:14:16.501 14983 15035 I TestRunner: at android.support.test.internal.runner.junit4.statement.RunBefores.evaluate(RunBefores.java:80)
04-16 13:14:16.501 14983 15035 I TestRunner: at android.support.test.internal.runner.junit4.statement.RunAfters.evaluate(RunAfters.java:61)
04-16 13:14:16.501 14983 15035 I TestRunner: at android.support.test.rule.ActivityTestRule$ActivityStatement.evaluate(ActivityTestRule.java:433)
04-16 13:14:16.501 14983 15035 I TestRunner: at android.support.test.rule.GrantPermissionRule$RequestPermissionStatement.evaluate(GrantPermissionRule.java:109)
04-16 13:14:16.501 14983 15035 I TestRunner: at android.support.test.rule.GrantPermissionRule$RequestPermissionStatement.evaluate(GrantPermissionRule.java:109)
04-16 13:14:16.501 14983 15035 I TestRunner: at org.junit.rules.RunRules.evaluate(RunRules.java:20)
04-16 13:14:16.501 14983 15035 I TestRunner: at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
04-16 13:14:16.501 14983 15035 I TestRunner: at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
04-16 13:14:16.501 14983 15035 I TestRunner: at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
04-16 13:14:16.501 14983 15035 I TestRunner: at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
04-16 13:14:16.501 14983 15035 I TestRunner: at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
04-16 13:14:16.501 14983 15035 I TestRunner: at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
04-16 13:14:16.501 14983 15035 I TestRunner: at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
04-16 13:14:16.501 14983 15035 I TestRunner: at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
04-16 13:14:16.501 14983 15035 I TestRunner: at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
04-16 13:14:16.501 14983 15035 I TestRunner: at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
04-16 13:14:16.501 14983 15035 I TestRunner: at org.junit.runners.Suite.runChild(Suite.java:128)
04-16 13:14:16.501 14983 15035 I TestRunner: at org.junit.runners.Suite.runChild(Suite.java:27)
04-16 13:14:16.501 14983 15035 I TestRunner: at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
04-16 13:14:16.501 14983 15035 I TestRunner: at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
04-16 13:14:16.501 14983 15035 I TestRunner: at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
04-16 13:14:16.501 14983 15035 I TestRunner: at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
04-16 13:14:16.501 14983 15035 I TestRunner: at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
04-16 13:14:16.501 14983 15035 I TestRunner: at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
04-16 13:14:16.501 14983 15035 I TestRunner: at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
04-16 13:14:16.501 14983 15035 I TestRunner: at org.junit.runner.JUnitCore.run(JUnitCore.java:115)
04-16 13:14:16.501 14983 15035 I TestRunner: at android.support.test.internal.runner.TestExecutor.execute(TestExecutor.java:58)
04-16 13:14:16.501 14983 15035 I TestRunner: at android.support.test.runner.AndroidJUnitRunner.onStart(AndroidJUnitRunner.java:375)
04-16 13:14:16.501 14983 15035 I TestRunner: at android.app.Instrumentation$InstrumentationThread.ru
04-16 13:14:16.501 14983 15035 I TestRunner: ----- end exception -----
04-16 13:14:16.501 14983 15035 I TestRunner: finished: networkTest(org.kiwix.kiwixmobile.tests.NetworkTest)
04-16 13:14:16.511 14983 14983 I MonitoringInstr: Activities that are still in CREATED to STOPPED: 1
04-16 13:14:16.511 14983 14983 I MonitoringInstr: Finishing activity: org.kiwix.kiwixmobile.zim_manager.ZimManageActivity@8138c20
04
This issue has been automatically marked as stale because it has not had recent activity. It will be now be reviewed manually. Thank you for your contributions.
Moving this to 3.0 and assigning to @macgills as this is exactly what he is working on these days.
I would say this ticket is too generalised and we should work on individual aspects. If you identify non robust test then we should focus on that test/class in its own ticket. Closing.
There are a couple of challenges when running automated tests on various Android devices. These include:
Each and all of these can cause some of our automated application tests to fail.
We have already implemented some code to try and handle prompts for permissions which reduce the number of devices that are affected. I'd like to further enhance the test scripts so that we can minimise the effects of these aspects of the Android run-times on various devices. Then we can run our automated tests across a wider range of device and operating-system revisions.
This is one of several tasks to improve the reliability, scalability, and trustworthiness of our automated tests.
Notes: Android's Permission model changed significantly in Android M (API 23)
As the docs say:
Espresso's test runner will often complain if it decides that animations are enabled on a device
Google's Android team provided an example of how to disable animations. For instance, here's an example from running the current Espresso Tests on one of my devices
and Google Developers provided a fairly complex script (available from the Internet Archive) to try to disable animations at runtime. However, that doesn't seem ideal, especially as it was intended for much older releases of Android:
Screen Overlays have been a bugbear for users and for automated testing for several years. I'm not aware of a reliable way to set/address this warning for automated tests.
I'd like to find ways to ameleorate or fully address these frustrations. This ticket is to track the individual issues and our progress. We may create additional issues for specific areas and/or changes depending on the detail & depth needed.