uds-se / droidmate

DroidMate-2: A Platform for Android Test Generation
http://www.boxmate.org/
GNU General Public License v3.0
28 stars 14 forks source link

ISSUE-3: ApkExplorationException during replay of a recorded test case #3

Closed mmilella94 closed 3 years ago

mmilella94 commented 5 years ago

I am using DM2 to perform capture and replay of automatically generated test cases. During the replay phase of a previously recorded test case I observe ApkExplorationException.

This happens for example for Version:1.2.5 (com.haringeymobile.ukweather, downloaded from https://www.apkmonk.com/app/com.haringeymobile.ukweather/).

The message logged on the console is the following: “ERROR org.droidmate.command.ExploreCommand - java.lang.RuntimeException: ERROR: tried to click non-actable Widget interactive=true-200835f1-1eb3-3866-ba7f-3ff3512568d0_8a329da3-53b2-3818-bf66-90ca49520426: TextView[text=Tue Jan 29 , inputType=0 0:0:0:0] org.droidmate.device.android_sdk.ApkExplorationException: java.lang.RuntimeException: ERROR: tried to click non-actable Widget interactive=true-200835f1-1eb3-3866-ba7f-3ff3512568d0_8a329da3-53b2-3818-bf66-90ca49520426: TextView[text=Tue Jan 29 , inputType=0 0:0:0:0] at org.droidmate.tools.ApkDeployer.withDeployedApk(ApkDeployer.kt:66) at org.droidmate.tools.ApkDeployer$withDeployedApk$1.invokeSuspend(ApkDeployer.kt) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:32) at kotlinx.coroutines.DispatchedTask.run(Dispatched.kt:236) at kotlinx.coroutines.EventLoopBase.processNextEvent(EventLoop.kt:123) at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:69) at kotlinx.coroutines.BuildersKtBuildersKt.runBlocking(Builders.kt:45) at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source) at kotlinx.coroutines.BuildersKtBuildersKt.runBlocking$default(Builders.kt:35) at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source) at org.droidmate.command.ExploreCommand$deployExploreSerialize$1.invoke(ExploreCommand.kt:333) at org.droidmate.command.ExploreCommand$deployExploreSerialize$1.invoke(ExploreCommand.kt:89) at org.droidmate.tools.AndroidDeviceDeployer.withSetupDevice(AndroidDeviceDeployer.kt:183) at org.droidmate.command.ExploreCommand.deployExploreSerialize(ExploreCommand.kt:332) at org.droidmate.command.ExploreCommand.execute(ExploreCommand.kt:314) at org.droidmate.command.ExploreCommand.execute(ExploreCommand.kt:240) at org.droidmate.frontend.DroidmateFrontend$Companion.execute(DroidmateFrontend.kt:131) at org.droidmate.frontend.DroidmateFrontend$Companion.execute$default(DroidmateFrontend.kt:97) at org.droidmate.frontend.DroidmateFrontend$Companion.main(DroidmateFrontend.kt:86) at org.droidmate.frontend.DroidmateFrontend.main(DroidmateFrontend.kt) Caused by: java.lang.RuntimeException: ERROR: tried to click non-actable Widget interactive=true-200835f1-1eb3-3866-ba7f-3ff3512568d0_8a329da3-53b2-3818-bf66-90ca49520426: TextView[text=Tue Jan 29 , inputType=0 0:0:0:0] at org.droidmate.exploration.actions.WidgetActionsKt.click(WidgetActions.kt:28) at org.droidmate.exploration.actions.WidgetActionsKt.click$default(WidgetActions.kt:26) at org.droidmate.exploration.strategy.playback.Playback.getNextAction(Playback.kt:133) at org.droidmate.exploration.strategy.playback.Playback.chooseAction$suspendImpl(Playback.kt:249) at org.droidmate.exploration.strategy.playback.Playback.chooseAction(Playback.kt) at org.droidmate.exploration.strategy.playback.Playback.internalDecide$suspendImpl(Playback.kt:227) at org.droidmate.exploration.strategy.playback.Playback.internalDecide(Playback.kt) at org.droidmate.exploration.strategy.AbstractStrategy.decide$suspendImpl(AbstractStrategy.kt:92) at org.droidmate.exploration.strategy.AbstractStrategy.decide(AbstractStrategy.kt) at org.droidmate.exploration.strategy.ExplorationStrategyPool.decide(ExplorationStrategyPool.kt:131) at org.droidmate.command.ExploreCommand.explorationLoop(ExploreCommand.kt:439) at org.droidmate.command.ExploreCommand.run(ExploreCommand.kt:390) at org.droidmate.command.ExploreCommand.tryExploreOnDeviceAndSerialize(ExploreCommand.kt:367) at org.droidmate.command.ExploreCommand$deployExploreSerialize$1$1$invokeSuspend$$inlined$forEachIndexed$lambda$1.invokeSuspend(ExploreCommand.kt:344) at org.droidmate.command.ExploreCommand$deployExploreSerialize$1$1$invokeSuspend$$inlined$forEachIndexed$lambda$1.invoke(ExploreCommand.kt) at org.droidmate.tools.ApkDeployer.withDeployedApk(ApkDeployer.kt:58) at org.droidmate.command.ExploreCommand$deployExploreSerialize$1$1.invokeSuspend(ExploreCommand.kt:343) ... 18 more”

The uuid changes with the test case, but i think that is related to the same widget. You can observe this behaviour if the action limit of the recorded case is >= 150.

We observe the same failure also with the following apps,related to a different widget (uuid and action changes)

Version:2.7.3, com.wikihow.wikihowapp, downloaded from https://www.apkmonk.com/app/com.wikihow.wikihowapp/ ) from F-droid Version:1.2.4 (org.billthefarmer.currency , downloaded from https://f-droid.org/en/packages/org.billthefarmer.currency) Setup: Android 7.1.1 NEXUS 9 API 25 emulator with Android Studio version 3.2.1 All the Apk has been instrumented I hope you will be able to reproduce the error with these information, Thank you
natanieljr commented 3 years ago

Assuming everything is working since there was no feedback after the solution