Skip to content

Default Exploration Strategies

natanieljr edited this page Jul 31, 2018 · 1 revision

Default strategies

DroidMate is currently shipped with a set of exploration strategies. These strategies can be freely combined according to the experiment guidelines. Additionally, DroidMate supports the development of new exploration strategies.

Configurable

The following exploration strategies are shipped by default and can be activated by configuration:

Reset

  • Goal: Reset the app and device to a known state.
  • Actions: Press home button (closes the app), enable Wi-fi, start the app's main activity.

Terminate

  • Goal: Terminates the exploration.
  • Actions: Stop Automation engine. Finish exploration

Back

  • Goal: Return to a previous screen.
  • Actions: Press the back button.

Explore

  • Goal: Randomly interacts a widget among those which have been least explored.
  • Actions: Click (or long click) on a coordinate.

ModelBased

  • Goal: Use a statically crawled model to estimate which UI elements have an event, randomly selects one element with an event and interact with it.
  • Actions: Click (or long click) on a coordinate.

FitnessProportionate

  • Goal: Use a statically crawled model to estimate which UI elements have an event, for each UI element, use the probability of having as it's fitness on a roulette wheel selection
  • Actions: Click (or long click) on a coordinate.

AllowRuntimeDialog

  • Goal: Authorize access to all resources requested by an app during exploration
  • Actions: Click on the Allow button on all runtime permission dialogs.

DenyRuntimeDialog

  • Goal: Denies access to all resources requested by an app during exploration
  • Actions: Click on the Deny button on all runtime permission dialogs.

Note: If both Allow and Deny runtime permissions are active. Allow permissions take precedence.

Playback

  • Goal: Replay a previously recorded exploration
  • Actions: Same actions as the original exploration (when the target UI elements are available)

Usable by extending DM-2

The following exploration strategies are shipped by default but are not activated by a configuration. To activate these strategies one must write a selector to trigger them.

RotateUI

Goal: Rotate the UI by X degrees. Actions: Issue a rotate UI command to the device.

MinimizeAndMaximize

Goal: Put the app in the background and bring it back to foreground to trigger different parts of its life-cycle. Actions: Press recent apps button. Presses this button again until the top activity is the same as the original one.