Los eventos generados por el mono de Android no son los mismos cuando la semilla es la misma
Yo uso el mono para poner a prueba mi aplicación. En https://developer.android.com/studio/test/monkey.html He leído:
-s <seed> Seed value for pseudo-random number generator. If you re-run the Monkey with the same seed value, it will generate the same sequence of events.
Pero cuando corrí el Mono dos veces con la misma semilla y luego comparé las salidas, las coordenadas de mis eventos ACTION_UP y ACTION_DOWN no eran iguales.
- Guiones de corredores de mono androide
- Cómo ejecutar script Monkeyrunner en varios dispositivos al mismo tiempo
- Actividad de Monkeyrunner
- ¿Dónde está el help.py para monkeyrunner de Android
- Monkeyrunner no toca la vista web
Salida # 1
:Monkey: seed=1470246130093 count=50 :AllowPackage: sample1.com.sample_1 :IncludeCategory: android.intent.category.LAUNCHER :IncludeCategory: android.intent.category.MONKEY // Event percentages: // 0: 7.5% // 1: 5.0% // 2: 1.0% // 3: 7.5% // 4: 50.0% // 5: -0.0% // 6: 12.5% // 7: 7.5% // 8: 1.0% // 9: 1.0% // 10: 0.5% // 11: 6.5% :Switch: #Intent;action=android.intent.action.MAIN;category=android.intent.category.LAUNCHER;launchFlags=0x10200000;component=sample1.com.sample_1/.MainActivity;end // Allowing start of Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=sample1.com.sample_1/.MainActivity } in package sample1.com.sample_1 :Sending rotation degree=2, persist=true :Sending rotation degree=3, persist=true :Sending rotation degree=3, persist=true :Sending rotation degree=0, persist=true :Sending rotation degree=0, persist=true :Sending rotation degree=1, persist=false :Sending rotation degree=2, persist=true :Sending rotation degree=2, persist=true :Sending rotation degree=0, persist=true :Sending Trackball (ACTION_MOVE): 0:(2.0,1.0) :Sending rotation degree=2, persist=false :Sending rotation degree=3, persist=true :Sending rotation degree=0, persist=false :Sending rotation degree=1, persist=false :Sending rotation degree=0, persist=true :Sending Touch (ACTION_DOWN): 0:(1091.0,998.0) :Sending Touch (ACTION_UP): 0:(1106.5758,994.1529) :Sending rotation degree=3, persist=false :Sending Trackball (ACTION_MOVE): 0:(-2.0,3.0) Events injected: 50 :Sending rotation degree=0, persist=false :Dropped: keys=0 pointers=0 trackballs=0 flips=0 rotations=0 ## Network stats: elapsed time=241ms (0ms mobile, 0ms wifi, 241ms not connected) // Monkey finished
Salida # 2
:Monkey: seed=1470246130093 count=50 :AllowPackage: sample1.com.sample_1 :IncludeCategory: android.intent.category.LAUNCHER :IncludeCategory: android.intent.category.MONKEY // Event percentages: // 0: 7.5% // 1: 5.0% // 2: 1.0% // 3: 7.5% // 4: 50.0% // 5: -0.0% // 6: 12.5% // 7: 7.5% // 8: 1.0% // 9: 1.0% // 10: 0.5% // 11: 6.5% :Switch: #Intent;action=android.intent.action.MAIN;category=android.intent.category.LAUNCHER;launchFlags=0x10200000;component=sample1.com.sample_1/.MainActivity;end // Allowing start of Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=sample1.com.sample_1/.MainActivity } in package sample1.com.sample_1 :Sending rotation degree=2, persist=true :Sending rotation degree=3, persist=true :Sending rotation degree=3, persist=true :Sending rotation degree=0, persist=true :Sending rotation degree=0, persist=true :Sending rotation degree=1, persist=false :Sending rotation degree=2, persist=true :Sending rotation degree=2, persist=true :Sending rotation degree=0, persist=true :Sending Trackball (ACTION_MOVE): 0:(2.0,1.0) :Sending rotation degree=2, persist=false :Sending rotation degree=3, persist=true :Sending rotation degree=0, persist=false :Sending rotation degree=1, persist=false :Sending rotation degree=0, persist=true :Sending Touch (ACTION_DOWN): 0:(1635.0,510.0) :Sending Touch (ACTION_UP): 0:(1650.5758,506.1529) :Sending rotation degree=3, persist=false :Sending Trackball (ACTION_MOVE): 0:(-2.0,3.0) Events injected: 50 :Sending rotation degree=0, persist=false :Dropped: keys=0 pointers=0 trackballs=0 flips=0 rotations=0 ## Network stats: elapsed time=428ms (0ms mobile, 0ms wifi, 428ms not connected) // Monkey finished
¿Por qué? Yo esperaba ver los mismos eventos y, por lo tanto, los productos idénticos
- Importación de MonkeyRunner en la secuencia de comandos de Python falla en Windows
- ¿Cómo puedo hacer una aplicación Java utilizando la API Monkeyrunner?
- Keyevent para hacer clic en Alert Dialog de la pantalla de Android
- Android Monkey no genera HPROF dump
- Cómo determinar si el teclado se muestra en la pantalla - mientras usa monkeyrunner
- Cómo Flick usando monkeyrunner? No solo arrastre
- Cuál es el 3ro argumento de monkeyrunner.press
- ¿Qué es exactamente un mono haciendo jugar con mi teléfono Android?
- ¿Cómo obtener el comportamiento de pantalla de inicio de arrastrar a bin, en mi propia aplicación?
- CardView muestra artefactos cuando RotationY> 60