3

How to disable Settings Reset for Android? It`s necessary for monkey testsing.

Felix Kling
  • 795,719
  • 175
  • 1,089
  • 1,143
Alexander
  • 31
  • 1

1 Answers1

2

How to disable Settings Reset for Android?

If the Monkey goes into the Settings application, the Monkey can change whatever settings the Monkey wants.

Hence, use the -p switch to limit the Monkey to only test your application. Attempts to invoke things outside of your app (e.g., HOME button) will then shock the Monkey.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • How do I pass -p switch? Can you please point to any reference? – Searock Feb 05 '15 at 14:47
  • @Searock: "How do I pass -p switch?" -- um, the same way that you would pass any command-line switch on any command-line program (e.g., **`adb shell monkey -p your.application.id.here`**). – CommonsWare Feb 05 '15 at 14:57
  • Thanks. So if I understand this correctly this will stop the tester from changing the app settings, right? – Searock Feb 05 '15 at 15:01
  • 1
    @Searock: It will keep the Monkey inside your application. Some settings, like volume, can be adjusted via keys, which the Monkey can still press. And, this has nothing to do with "app settings", which would be your own `PreferenceActivity` and/or `PreferenceFragments` -- the Monkey can still get at those. – CommonsWare Feb 05 '15 at 15:02